#76860TYPO3 6.2.25 - Access to protected page - going up the tree is interrupted by 404 handling
Description
Configuration
- 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
Problem
- 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?