0
votes

I'm trying to override twig html error templates as per the symfony documentation

So I tried to override the views like for other third party bundles by creating the following files in 'templates/bundles/TwigBundle/Exception' :

  • error.html.twig
  • error404.html.twig

However the default html twig error templates show up when I trigger a 404 error in production mode.

Testing with the /_error/{statusCode} route in dev mode displays my custom templates correctly.

1
did you clear cache? - gautamaggarwal
yes both symfony and browser - test user please ignore
Production cache? - gautamaggarwal

1 Answers

0
votes

EDIT: I found out that it was an issue with FriendsOfSymfony/FOSRestBundle. Using composer require friendsofsymfony/rest-bundle dev-master solved the issue