Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 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 v11 here: TYPO3 ELTS.
Error action
Extbase offers an out of the box handling for errors. Errors might occur during the mapping of incoming action arguments. For example, an argument can not be mapped or validation did not pass.
How it works
- Extbase will try to map all arguments within
Action
. During this process arguments will also be validated.Controller - If an error occurred, the class will call the
$this->error
instead of determinedMethod Name $this->action
.Method Name -
The default is to call
error
which will:Action () - Clear cache in case
persistence.
is activated and current scope is frontend.enable Automatic Cache Clearing - Add an error Flash Message
by calling
add
. It will in turn callError Flash Message () get
to retrieve the message to show.Error Flash Message () - Return the user to the referring request URL. If no referrer exists, a plain text
message will be displayed, fetched from
get
.Flattened Validation Error Message ()
- Clear cache in case