Bug #44454
closedpageNotFound_handling never happens
100%
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
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18558
Updated by Tilo Baller over 11 years ago
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
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18558
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18558
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18792
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18792
Updated by Anonymous over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 51cae9e4a4ab3dddf5f3ca039c3704ba9c30986e.
Updated by Klaus Hinum over 11 years ago
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.') {>error_getRootLine_failPid =
$this1;>getCode() === 1343589451) {
}
return array();
/** @see \TYPO3\CMS\Core\Utility\RootlineUtility::getRecordArray */
} elseif ($ex
return array();
}
throw $ex;
}
}