gpt4 book ai didi

php - Symfony 2.1 - 未捕获的 PHP 异常 Twig_Error_Runtime

转载 作者:可可西里 更新时间:2023-10-31 23:07:27 27 4
gpt4 key购买 nike

尝试在 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

最佳答案

如果启用了 profiler 但缺少路由配置,则会在 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

这将解决您的问题。

关于php - Symfony 2.1 - 未捕获的 PHP 异常 Twig_Error_Runtime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16708316/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com