Symfony2 WebProfiler(500):变量" app"在第1行的@ Doctrine / Collector / db.html.twig中不存在

时间:2015-03-17 21:04:42

标签: php symfony twig profiler

实际上,这是我第一次没有找到错误消息的单一搜索结果。在每个页面加载时,我都会收到一条弹出消息:

"加载Web调试工具栏时出错(500:内部服务器错误)。 你想打开探查器吗?"当我打开探查器/日志时:

Variable "app" does not exist in @Doctrine/Collector/db.html.twig at line 1  

我对树枝模板进行了一些翻译和编辑 - 真的没什么特别的。现在,探查器无法在每个页面上加载。

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": "~1.1@dev",
    "friendsofsymfony/user-bundle": "1.3.*@dev",
    "doctrine/doctrine-fixtures-bundle": "2.2.*",
    "doctrine/migrations": "1.0.*@dev",
    "doctrine/doctrine-migrations-bundle": "~1.0"
},

缓存已清除,等等我没有要求解决方案,但您是否知道此案可能是什么?

非常感谢你的帮助和帮助。时间!

Moritz的

1 个答案:

答案 0 :(得分:1)

它可能仍然与缓存有关,除了缓存之外还尝试重建引导缓存:clear prod&amp; dev的。

 php ./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php

PS:symfony版本中的路径可能不同。