Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 2.1 - Uncaught PHP Exception Twig_Error_Runtime

I am getting this error when trying to open a route in Symfony 2.1

I realy have no idea where to check that. There is nothing on the internet.

Thank you very much for your help:

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

like image 768
Milos Cuculovic Avatar asked May 23 '13 07:05

Milos Cuculovic


1 Answers

This Exception is thrown in the dev environment if the profiler is enabled but it's routing configuration is missing.

Unable to generate a URL for the named route "_wdt" as such route does not exist.

Please check that your app/config/routing_dev.yml contains the following lines:

# 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

This will fix your issue.

like image 97
Nicolai Fröhlich Avatar answered Oct 26 '22 13:10

Nicolai Fröhlich