Bug #76860
closedTYPO3 6.2.25 - Access to protected page - going up the tree is interrupted by 404 handling
0%
Description
- TYPO3 6.2.25
- Configured 404 Handling
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = '/some/page/404.php'; $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_statheader'] = 'HTTP/1.0 404 Not Found';
- Tree with protected pages
| |-ID 1: Page Root (mydomain.com) |- ID 2: Login Page (not protected by group, public access) |- ID 3: Restricted Area (protected, visible for special fe group, assigned after login) |- ID 4: Some page in protected area
- if i'am not logged in
- trying to call http://www.mydomain.com?id=3, which is a protected page
- I will get the configured 404 page instead of the content of ID 2
- I expect the content of ID 2, cause it is the first non protected page in the root line
- The same configuration works fine with TYPO3 6.2.2
- investigating typo3_6.2.25/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php (Lines 1697-1701)
- Found section
} 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); }
- This is the part where the correct page (ID 2) is determined
- due to $this->pageNotFound has the value 2 here, the 404 handler is triggered (i guess)
- setting $this->pageNotFound=0 here solves my problem
(?) Could you please evaluate this solution?
Updated by Tobias Hein over 8 years ago
Udpate: seems as my "solution" does not work, not sure what i mixed up to come to that solution, so at the moment there is now solution.
Updated by Tobias Hein over 8 years ago
Update
Seems as it is Section 1610-1615. I added a reset of the pageNotFound value due to the code could determine an accessible page. With this fix the configuration works again as expected.
$this->id = $this->rootLine[$c]['uid']; $this->page = $this->sys_page->getPage($this->id); if (count($this->page)) { $this->pageNotFound = 0; // reset the pageNotFound Value break; }
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48719
Updated by Oliver Hader almost 8 years ago
- Status changed from Under Review to Closed
Dropped for 6.2 since page-not-found handlers most probably worked around this behavior already. Changing the behavior now in 6.2 would required to update those handlers as well. The behavior is still valid for master, please continue at issue #75622