"Error, an error has occurred! Code: 201601301501048 .." in TYPO3 7.6

I installed Typo3 version 7.6 and after adding the extension to my page I got the error "Unfortunately, an error has occurred! Code: 201512031647523f4d731f". I do not understand the meaning of this error, and I also enable 'displayErrors' => 1 in the local configuration, but still do not get a meaningful error. enter image description here

+7
typo3
source share
3 answers

This is mainly date + hash, which makes each of these errors unique.

For a development environment , you can disable it , as @Jost recommended.

But for production, it is important for it to turn on , so if some of your plugins or TS libraries do not work, it will not break the complete output and show β€œAn error has occurred” without any information, but you now see the message with the code.

The real user of the site can tell you this code, and you can search for this code in the TYPO3 error log, which is by default located under typo3temp/logs/ , if you did not configure it differently.

Thus, this function really makes your life easier to find out user errors.

+8
source share

You need to disable the "Content Object Exception Handler", which is the exception handler in new versions. If a content item / plugin throws an exception, it no longer removes the entire site, but only itself. To disable it, install

 config.contentObjectExceptionHandler = 0 

Reference

Do not forget to turn on the exception handler again when switching to live mode, and in your life support system - search for the trace of exceptions in the log files. Basically what Victor Livakovsky says in another answer.

+19
source share

You can open the file. / typo 3 / sysext / frontend / Classes / ContentObject / Exception / ProductionExceptionHandler.php

Opp string search , an error has occurred! . Add a debug line immediately after the function declaration.

  /** * Handles exceptions thrown during rendering of content objects * The handler can decide whether to re-throw the exception or * return a nice error message for production context. * * @param \Exception $exception * @param AbstractContentObject $contentObject * @param array $contentObjectConfiguration * @return string * @throws \Exception */ public function handle(\Exception $exception, AbstractContentObject $contentObject = null, $contentObjectConfiguration = array()) { debug ($exception, 'handle $exception'); 

Then you use the debug extension, for example. fh_debug . This will give you such a result. It shows you the callback line that leads to this error. The outputs are shown in two formats. You can add additional debugging lines to the positions in front of the places from the backtraces to get additional information about the error.

 <table><tbody><tr><td>index.php</td><td>34</td><td>call_user_func</td></tr><tr><td>index.php</td><td>33</td><td>run</td></tr><tr><td>Application.php</td><td>78</td><td>handleRequest</td></tr><tr><td>Bootstrap.php</td><td>302</td><td>handleRequest</td></tr><tr><td>RequestHandler.php</td><td>232</td><td>INTincScript</td></tr><tr><td>TypoScriptFrontendController.php</td><td>3478</td><td>recursivelyReplaceIntPlaceholdersInContent</td></tr><tr><td>TypoScriptFrontendController.php</td><td>3512</td><td>INTincScript_process</td></tr><tr><td>TypoScriptFrontendController.php</td><td>3564</td><td>cObjGetSingle</td></tr><tr><td>ContentObjectRenderer.php</td><td>859</td><td>render</td></tr><tr><td>ContentObjectRenderer.php</td><td>943</td><td>render</td></tr><tr><td>ContentObjectArrayContentObject.php</td><td>41</td><td>cObjGet</td></tr><tr><td>ContentObjectRenderer.php</td><td>805</td><td>cObjGetSingle</td></tr><tr><td>ContentObjectRenderer.php</td><td>859</td><td>render</td></tr><tr><td>ContentObjectRenderer.php</td><td>953</td><td>handle</td></tr><tr><td>ProductionExceptionHandler.php</td><td>53</td><td>debug</td></tr></tbody></table><br><table><tbody><tr><th>Object TYPO3\CMS\Core\Error\Exception</th></tr><tr><td>message</td><td class="el">PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::render() must be an instance of TYPO3\CMS\Frontend\ContentObject\AbstractContentObject, null given, called in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php on line 1359 and defined in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 927</td></tr> <tr><td>code</td><td class="el"><table><tbody><tr><th>Integer</th></tr><tr><td>1</td></tr></tbody></table></td></tr> <tr><td>file</td><td class="el">/home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/core/Classes/Error/ErrorHandler.php</td></tr> <tr><td>line</td><td class="el"><table><tbody><tr><th>Integer</th></tr><tr><td>111</td></tr></tbody></table></td></tr> </tbody></table> <h3>handle $exception</h3><hr> 

Text added later: At the same time, there is no need to edit the PHP ProductionExceptionHandler.php TYPO3 file. You simply install and configure the fh_debug extension, which now takes the necessary step automatically.

-one
source share

All Articles