Closed clemensfreitag-dev closed 4 years ago
Please update to Contao 4.8.5 first.
BTW: Use the issue tracker of the Contao monorepo to report new issues in Contao (however, the issue can now also be moved by the project owner instead).
created https://github.com/contao/contao/issues/993, so this one is a duplicate now.
Like I already said, the ticket could have been moved accordingly by the project owner. So you didn't have to create a new one.
But no matter.
Disclaimer
This is my very first issue on the Contao project ;)
Affected version(s)
Contao: Contao 4.8.4 installed with Contao Manager PHP:
7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0
Description
After a clean installation of Contao and some configurations on the backend, I observe the following PHP fatal error in the Apache logs on all most every frontend access:
[php7:error] [pid 26793] [client [CROP]] PHP Fatal error: Uncaught Symfony\\Component\\Debug\\Exception\\FatalThrowableError: Argument 1 passed to Contao\\CoreBundle\\Fragment\\FragmentRegistry::get() must be of the type string, object given, called in [CROP]/contao4-dev/vendor/contao/core-bundle/src/HttpKernel/ControllerResolver.php on line 43 in [CROP]/contao4-dev/vendor/contao/core-bundle/src/Fragment/FragmentRegistry.php:54\nStack trace:\n#0 [CROP]/contao4-dev/vendor/contao/core-bundle/src/HttpKernel/ControllerResolver.php(43): Contao\\CoreBundle\\Fragment\\FragmentRegistry->get(Object(Closure))\n#1 [CROP]/contao4-dev/vendor/symfony/http-kernel/HttpKernel.php(134): Contao\\CoreBundle\\HttpKernel\\ControllerResolver->getController(Object(Symfony\\Component\\HttpFoundation\\Request))\n#2 [CROP]/contao4-dev/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 2)\n# in [CROP]/contao4-dev/vendor/contao/core-bundle/src/Fragment/FragmentRegistry.php on line 54, referer: [CROP]/home.html
(host-related data replaced with [CROP])The same issue is also reported here but I didn't identified any bug related on GitHub so far: https://community.contao.org/de/showthread.php?75959-Fehler-nach-Update-von-4-7-zu-4-8-3
Briefly looking into the source of the mentioned ControllerResolver.php:
$request->attributes->get('_controller')
seems to return an object instead of a string what the called get() would expect.How to reproduce
I assume it's not related to my server configuration, so I assume it's reproducable with the mentioned Contao+PHP setup.