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!
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`: Pathes 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`: Pathes 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`: Pathes to Fluid Templates, Partials and Layouts in case more flexibility is needed.
- Example
EXT:sitepackage/Resources/Private/Layouts/
errorContentSource¶
- Datatype
- string
- Description
- 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
- Fully qualified class name of a custom error handler implementing
PageErrorHandlerInterface
. - Example
My\Site\Error\Handler