Attention
TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
Error Handling¶
Error handling can be configured on site level and is automatically dependent on the current site and language.
The configuration consists of two parts:
The HTTP Error Status Code that should be handled
The Error Handler Configuration
You can define one error handler per HTTP error code and add a generic one that serves all error pages.
No more trouble with translated 404 error pages. With the new site handling getting translated 404 is easy!
Attention
Exceptions must be handled via Error and Exception Handling since they occur on a much lower level. These are currently not covered by site error handling.
Properties¶
errorCode¶
- Datatype
int
- Description
The HTTP (Error) Status Code to handle. The predefined list contains the most common errors, a free definition of other error codes is also possible. Special value
0
will take care of all errors.- Example
404
errorHandler¶
- Datatype
string / enum
- Description
Define how to handle these errors. May be
Fluid
for rendering a fluid template,Page
for fetching content from a page orPHP
for a custom implementation.- Example
Fluid
errorFluidTemplate¶
- Datatype
string
- Description
Only if errorHandler == `fluid`: Path to fluid template file. Path may be
absolute
relative to site root
starting with
EXT:
for files from an extension
- Example
EXT:sitepackage/Resources/Private/Templates/Error.html
errorFluidTemplatesRootPath¶
- Datatype
string [optional]
- Description
Only if errorHandler == `Fluid`: Paths to Fluid Templates, Partials and Layouts in case more flexibility is needed.
- Example
EXT:sitepackage/Resources/Private/Templates/
errorFluidPartialsRootPath¶
- Datatype
string [optional]
- Description
Only if errorHandler == `Fluid`: Paths to Fluid Templates, Partials and Layouts in case more flexibility is needed.
- Example
EXT:sitepackage/Resources/Private/Partials/
errorFluidLayoutsRootPath¶
- Datatype
string [optional]
- Description
Only if errorHandler == `Fluid`: Paths to Fluid Templates, Partials and Layouts in case more flexibility is needed.
- Example
EXT:sitepackage/Resources/Private/Layouts/
errorContentSource¶
- Datatype
string
- Description
Only if `errorHandler: Page`: May be either an External URL or TYPO3 Page that will be fetched with curl and displayed in case of an error.
- Example
t3://page?uid=123
errorPhpClassFQCN¶
- Datatype
string
- Description
Only if `errorHandler: PHP`: Fully qualified class name of a custom error handler implementing
PageErrorHandlerInterface
.- Example
My\Site\Error\Handler