Under construction - work in progress

More friendly error and maintenance pages

Sometimes standard error page are misleading for users or customers facing an error message, which may be criptic to their eyes, or may look as coming from an unkown site.

So we've added and easy way to use customized and more friendly HTML templates.

Two parameters have been added in config_default.php, and have been integrated in the installation tool:

$TYPO3_CONF_VARS[FE][feErrorDisplay]: permits to define an HTML file for display of internal or generic Ease3 errors; unique values are empty or READFILE:path/file. This parameter overrides old parameter 'feErrorTemplate'.

$TYPO3_CONF_VARS[FE][disableFeAccessDisplay] permits to define an HTML file which will be displayed while access to FE pages is disabled; it may contains:

  • String; HTML file or URL to show (reads content and outputs with correct headers), e.g. 'maintenance.html' or 'http://www.example.org/errors/maintenance.html
  • Prefix "REDIRECT:": If prefixed "REDIRECT:" it will redirect to the URL/script after the prefix.
  • Prefix "READFILE:": If prefixed with "READFILE:" then it will expect the remaining string to be a HTML file which will be read and outputted directly after having the marker "###CURRENT_URL###" substituted with REQUEST_URI and ###REASON### with reason text, for example: "READFILE:fileadmin/maintenance.html".
  • Prefix "USER_FUNCTION:": If prefixed "USER_FUNCTION:" then it will call a user function, eg. "USER_FUNCTION:fileadmin/class.user_maintenance.php:user_maintenance->pageMaintenance" where the file must contain a class "user_maintenance" with a method "pageMaintenance" inside with two parameters $param and $ref. If the client matches [SYS][devIPmask], this setting is ignored and the page is shown as normal.

Note: do not use string or REDIRECT to point to the same website of this installation (a string with only file path will be converted to a full URI like www.thissite.com/filepath), or an endless loop may happen. If you wish to use a local HTML template, use READFILE. This parameter overrrides old parameter 'disableFeAccessTemplate'.

These templates may be created freely; they must simply be complete HTML pages.

They may contain TAGS which will be substituted with error messages and other informations or settings.

Extended list of TAGS may be found inside sysext/t3skin/templates/errorpage-message.html.

Basic TAGS are these two:

  • ###TITLE### for error title
  • ###MESSAGE### for error message

We suggest not to show detailed errors in public error page, and show insted a simple error page. Usually these are pages by which a company handles an error/maintenance situation towards its customers, so the page should be in the same style of general website, calming and simple to understand.

Consider that, any time an error page is called, a line with title and message of the error is added to Ease3 syslog.

Usage of elder parameters format

Parameters changed from version 4.5.107. If none of these parameters is found, and any two parameters defined as described in 4.5.16 is found, then the old parameters are converted and used.