Since I upgraded to Symfony 2.7, I get an error 500
on my error pages when I try to generate a route in twig:
<!-- app/Resources/TwigBundle/views/Exception/error404.html.ywig -->
<a href="{{ path( 'homepage' ) }}">Take me home</a>
The error is:
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "homepage" as such route does not exist.") in TwigBundle:Exception:error404.html.twig at line 47.
I can call the route from any page that is not located within the app
folder. The route exists in src\Acme\AcmeBundle\Resources\config\routing.yml
.
Edit:
My routing:
homepage:
path: /
defaults: { _controller: SiteBundle:Site:index }
<a href="/homepage">Take me home</a>
– Abdulla Nilam