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.
Production exception handler
Functionality of the \TYPO3\
:
- Shows brief exception message ("Oops, an error occurred!") using
\TYPO3\
and its attendant template.CMS\ Core\ Controller\ Error Page Controller - Logs exception messages via the logging API.
- Logs exception messages to the sys_log table. Logged errors are displayed in the belog extension (Admin Tools > Log). This will only work with an existing DB connection.
Depending on the Logging writer configuration the exception output can be found for example in the following locations:
\TYPO3\
CMS\ Core\ Log\ Writer\ File Writer - In Composer-based installations the information can be found in directory
var/
. In legacy installations inlogs/ typo3temp/
.var/ logs/ \TYPO3\
CMS\ Core\ Log\ Writer\ Syslog Writer - Logs exception messages to the
sys_
table. Logged errors are displayed in the backend module Admin Tools > Log.log
Here you find a complete list of Log writers.
Message "Oops, an error occurred!"
The generic error message "Oops, an error occurred!" is displayed when an exception or error happens within a TypoScript content object like FLUIDTEMPLATE or a plugin. When the exception affects only one content element or plugin it is displayed in place of that elements. However, if it affects the content element representing the whole page like FLUIDTEMPLATE only a plain page with this text on it is displayed.
This message is displayed in production context instead of a more detailed exception message. The detailed message can then be found in the log.
Show detailed exception output
When the frontend debugging is activated, a detailed exception message is output instead of the generic "Oops, an error occurred!" message.
By default, debugging is enabled in the
TYPO3 contexts starting with Development
. It can
also be enabled by setting
config.contentObjectExceptionHandler
in TypoScript.
Example: prevent "Oops, an error occurred!" messages for logged-in admins
[backend.user.isAdmin]
config.contentObjectExceptionHandler = 0
[END]