symfony - admin 404
I'm trying to create a custom 404 page in my admin when something goes wrong and a 404 is thrown.
In my settings.yml file in:
apps/admin/config/settings.yml
I have the following:
all:
.actions:
# 404 module/action
error_404_开发者_开发百科module: common
error_404_action: error404
I have the module 'common' in my modules folder and I've defined an action called:
executeError404()
and also the template:
error404Success.php
But for some reason, this action never seems to get called as I've tried an exit(); but it still calls the default 404 error message that symfony throws.
Does anyone have any ideas?
Thanks
The custom 404 page doesn't show when in dev mode. If you change your front controller to the production one you should see it if it's configured correctly.
So rather than going to frontend_dev.php
got to frontend.php
or index.php
depending on your setup.
精彩评论