php - Symfony2 WebProfiler (500): Variable "app" does not exist in @Doctrine/Collector/db.html.twig at line 1
It's actually the first time for very long that I haven't found a single search result for an error message. On every page load I get a popup message saying:
"An error occurred while loading the web debug toolbar (500: Internal Server Error). Do you want to open the profiler?" And when I open the profiler / logs:
Variable "app" does not exist in @Doctrine/Collector/db.html.twig at line 1
I made some translations and edits of twig templates - really nothing fancy. Now the profiler fails to load on every page.
my composer.json:
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.6.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.4.*",
"twig/extensions": "1.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"stof/doctrine-extensions-bundle": "[email protected]",
"friendsofsymfony/user-bundle": "1.3.*@dev",
"doctrine/doctrine-fixtures-bundle": "2.2.*",
"doctrine/migrations": "1.0.*@dev",
"doctrine/doctrine-migrations-bundle": "~1.0"
},
caches cleared, etc. I'm not asking for a solution but do you have any clue what the case could be here?
Thank you very much for your help & time!
Moritz
Answer
Solution:
It may still be related to the cache, try to rebuild your bootstrap cache in addition to cache:clear prod & dev.
PS: the path may be different in your symfony version.