Bug #14577
closedt3lb_userauthgroup::isInWebMount doesn't take page versions into account
0%
Description
A backend user has set a webmount to just a single page which has multiple versions. Now he can view the list with all versions of the page, but when he wants to see one of these versions in the frontend, he can't because there is an error "The requested page didn't have a proper connection to the tree-root! (Broken rootline)". This error happens because the function t3lib_userauthgroup::isInWebMount doesn't check if current page is a version of the mounted page. This only happens when [BE][lockBeUserToDBmounts] is set to 1 (install tool).
I'll try to provide a bugfix later.
(issue imported from #M842)
Files
Updated by Sebastian Kurfuerst over 19 years ago
I'm not sure if that bug relates to the current one:
http://bugs.typo3.org/bug_view_advanced_page.php?bug_id=0000645
Sebastian
Updated by Irene H¶ppner over 19 years ago
I localized the reason in the index.php for the frontend:
In Line 261 the function $BE_USER->extPageReadAccess($TSFE->page) is called, which - for not-admin-users and pid==-1 (versioned page) - will call functions that need the TCA to be loaded.
The first function that needs the TCA is be t3lib_BEfunc::fixVersioningPid.
But: At this point no TCA is loaded. It will be loaded just a few lines later in the index.php: line 280 ($TSFE->getCompressedTCarray();
There seem to be two solutions to the problem:
1. Load TCA earlier in index.php. This would have to be in line 158:
<snip>
$TSFE->determineId();
$TSFE->getCompressedTCarray();
// Now, if there is a backend user logged in and he has NO access to this page, then re-evaluate the id shown!
if ($TSFE->beUserLogin && !$BE_USER->extPageReadAccess($TSFE->page)) {
</snip>
2. Check, if TCA is loaded and if not do so in t3lib_BEfunc::fixVersioningPid:
<snip>
global $TCA;
if (!is_array($TCA)) {
$GLOBALS['TSFE']->getCompressedTCarray();
}
if ($rr['pid']==-1 && $TCA[$table]['ctrl']['versioning']) {
</snip>
As I'm not sure which is the better way at all, I added both patches to the bugtracker.
Loading TCA before using functions that need it seems to be somehow "cleaner" to me. However, maybe it makes sence to add the tca-check to some other functions in t3lib_BEfunc as well...
(using 3.8.0)
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - TYPO3 Version changed from 3.8.0-dev to 3.8
This issue is very old and the TYPO3 Version isn't supported any more.
Can you reproduce this problem with a newer Version of TYPO3 CMS like 4.5 or 6.0?
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to Closed
No feedback for over 90 days.