eZ Community » Forums » Install & configuration » 'Module not found' override

'Module not found' override

'Module not found' override

Monday 13 March 2006 10:54:33 am - 8 replies

Which template should I override for a custom page to display instead of the 'Module not found' page?

Monday 13 March 2006 11:09:11 am

you can set this in the site.ini:


Set here the ErrorHandler to the defaultpage, then the module not found will not displayed

Monday 13 March 2006 11:22:25 am

Isn't the default page also the page that users are redirected to when they log in? Isn't it possible to create a default error-page that is only used in case of errors?

Monday 13 March 2006 12:21:35 pm

'Module not found' generates a '404 Not Found' header, which is correct. So it should not show the default page, but a custom error page.
Normally, you would just create an override, but what are the override match conditions for the 'Module not found' template?

Wednesday 15 March 2006 10:33:45 am

ErrorHandler=defaultpage does redirect to the defaultpage on an error, but with a 200 OK response.
How do I generate a custom error page with a 404 Not Found response?

Modified on Wednesday 15 March 2006 10:37:31 am by Marc Boon

Wednesday 15 March 2006 10:58:18 am

Hi Marc

Have a look at error.ini I suspect you will be able to tweak some settings there to suit your needs.


Wednesday 15 March 2006 12:37:12 pm

Thanks for the tip!

I created a error.ini.append.php in my siteaccess/override folder (actually, in my extension/site/settings/override folder, since I use a extension for the common settings of my multilingual site). It looks like this:

# 404 handler for 'module not found'

The rerun handler assures that the correct HTTP response '404 - Not Found' is send.

In my override.ini.append.php, I have specified a override template for error pages, which are Folder objects, contained in a Folder with node id 379:

# content/view/full template for error pages

I create a Folder object for each error, with the error code as short_name, the error message as name, and a optional short and long description. The 404 folder has node id 380.
In the template file error_page.tpl, I display the folder attributes in my site style, embedded in the sites pagelayout template.
Since I run a multilingual site, all attributes are also translated, so each language's siteaccess gets the error messages in the correct language.

Works like a charm!

Thursday 03 April 2008 1:11:46 pm


I have used to your method successfully, however you mention "errors", have you been able to replace "access denied" errors with this same method? If so, how?


Friday 25 April 2008 6:32:44 pm


it took me some time to figure out why this did not work on my eZ 4.0

there is an issue concerning this


it is fixed in the trunk version


enjoy the day



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from