Bug #44454
closed
pageNotFound_handling never happens
Added by Christian Futterlieb almost 12 years ago.
Updated about 6 years ago.
Description
The RootlineUtility
throws an Exception when the rootline could not be fetched. TyposcriptFrontendController
does not catch it, so it is impossible to start the pageNotFound_handling.
The attached patch solves this problem, but maybe the issue goes further than this simple piece ;-)
I detected the problem in a blank 6.0.0 installation without realurl (or similar) installed.
Files
- Status changed from New to Under Review
Thanks Christian and Thorben for the patch. I tested the one Thorben pushed to gerrit and it works for me.
Just some notes for reproducing the problem and testing the patch.
The problem does not depend on EXT:realurl, it occurs with or without realurl installed.
Without the patch:
- browse to /?id=666 (where '666' should be a page id which is not assigned in our instance)
- you should see sth. like "Oops an error occured" or if you set debug mode on "Uncaught TYPO3 Exception - #1343589451: Could not fetch page data for uid 666."
With patch:
- browse to /?id=666 (where '666' should be a page id which is not assigned in our instance)
- you should see the 404 page (build in or your defined one) as expected
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Patch seems to work for me.
replaced getRootline in Typo3 6.0.4 with:
public function getRootLine($uid, $MP = '', $ignoreMPerrors = FALSE) {
$rootline = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', $uid, $MP, $this);
try {
return $rootline->get();
} catch (\RuntimeException $ex) {
if ($ignoreMPerrors) {
$this->error_getRootLine = $ex->getMessage();
if (substr($this->error_getRootLine, 7) == 'uid -1.') {
$this>error_getRootLine_failPid = 1;
}
return array();
/** @see \TYPO3\CMS\Core\Utility\RootlineUtility::getRecordArray */
} elseif ($ex>getCode() === 1343589451) {
return array();
}
throw $ex;
}
}
- Status changed from Resolved to Closed
Also available in: Atom
PDF