This introduced a regression. It turns out that it needs more work
to get all cases covered correctly.
Resolves: #58728
Reverts: #16472
Releases: 6.1, 6.2, 6.3
This reverts commit
9ab3b9b5dd96ae0f955277a8997abb4bd69a66ff
Change-Id: I395e052c1f31adde715f5a25f9d1716c092dd908
Reviewed-on: https://review.typo3.org/31045
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
*
* Sets or manipulates internal variables such as: $this->id, $this->page, $this->rootLine, $this->MP, $this->pageNotFound
*
*
* Sets or manipulates internal variables such as: $this->id, $this->page, $this->rootLine, $this->MP, $this->pageNotFound
*
- * @param integer $iterations Number of loops which can be done to find a page (follow shortcuts or login pages)
- * @return void
- * @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException
* @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
* @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
+ * @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException
+ * @return void
* @access private
* @todo Define visibility
*/
* @access private
* @todo Define visibility
*/
- public function getPageAndRootline($iterations = 20) {
+ public function getPageAndRootline() {
$this->page = $this->sys_page->getPage($this->id);
if (!count($this->page)) {
// If no page, we try to find the page before in the rootLine.
$this->page = $this->sys_page->getPage($this->id);
if (!count($this->page)) {
// If no page, we try to find the page before in the rootLine.
throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException($message, 1301648781);
}
}
throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException($message, 1301648781);
}
}
- // We found something so reset to zero
- $this->pageNotFound = 0;
// Is the ID a link to another page??
if ($this->page['doktype'] == \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT) {
// We need to clear MP if the page is a shortcut. Reason is if the short cut goes to another page, then we LEAVE the rootline which the MP expects.
// Is the ID a link to another page??
if ($this->page['doktype'] == \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT) {
// We need to clear MP if the page is a shortcut. Reason is if the short cut goes to another page, then we LEAVE the rootline which the MP expects.
}
// Checking for include section regarding the hidden/starttime/endtime/fe_user (that is access control of a whole subbranch!)
if ($this->checkRootlineForIncludeSection()) {
}
// Checking for include section regarding the hidden/starttime/endtime/fe_user (that is access control of a whole subbranch!)
if ($this->checkRootlineForIncludeSection()) {
- $message = '';
- if (count($this->rootLine)) {
- if ($iterations > 0) {
- $this->pageNotFound = 0;
- $el = reset($this->rootLine);
- $this->id = $el['uid'];
- $this->getPageAndRootline($iterations - 1);
- } else {
- $message = 'The requested page was not accessible due to many shortcut loops into non accessible pages!';
- }
- } else {
+ if (!count($this->rootLine)) {
$message = 'The requested page was not accessible!';
$message = 'The requested page was not accessible!';
if ($this->checkPageUnavailableHandler()) {
$this->pageUnavailableAndExit($message);
} else {
GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1301648234);
}
if ($this->checkPageUnavailableHandler()) {
$this->pageUnavailableAndExit($message);
} else {
GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1301648234);
}
+ } else {
+ $el = reset($this->rootLine);
+ $this->id = $el['uid'];
+ $this->page = $this->sys_page->getPage($this->id);
+ $this->rootLine = $this->sys_page->getRootLine($this->id, $this->MP);