Symfony 2.1 – 未捕获的PHP异常Twig_Error_Runtime

前端之家收集整理的这篇文章主要介绍了Symfony 2.1 – 未捕获的PHP异常Twig_Error_Runtime前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试在Symfony 2.1中打开路由时出现此错误

我真的不知道在哪里检查.互联网上什么都没有.

非常感谢您的帮助:

CRITICAL – Uncaught PHP Exception Twig_Error_Runtime: “An exception has been thrown during the rendering of a template (“Unable to generate a URL for the named route “_wdt” as such route does not exist.”) in “@WebProfiler/Profiler/toolbar_js.html.twig” at line 15.” at /home/milos/workspace/merrin3.0/vendor/twig/twig/lib/Twig/Template.PHP line 280

如果启用了探查器但缺少路由配置,则会在dev环境中抛出此异常.
Unable to generate a URL for the named route "_wdt" as such route does not exist.

请检查您的app / config / routing_dev.yml是否包含以下行:

# app/config/routing_dev.yml

_wdt:
    resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
    prefix:   /_wdt

_profiler:
    resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
    prefix:   /_profiler

这将解决您的问题.

原文链接:https://www.f2er.com/php/135561.html

猜你在找的PHP相关文章