Custom error templates in Symfony2 not showing right content
In Symfony it is very easy to create custom error or exception pages as is described in the cookbook. It is even possible to create custom error pages for each of the http statuses, like 403 or 404.
It is important to keep in mind that you test your custom page in production mode, since symfony gives an extensive error report in dev mode.
However, the steps to undertake didn’t result in a nice error page for me, and I got seriously stuck. The solution to my problem had to do with clearing the cache for production. When clearing the cache it’s necessary to add the following variable: –no-debug.
So your command would be like this: php app/console cache:clear –env=prod –no-debug