Project

General

Profile

Actions

Bug #14577

closed

t3lb_userauthgroup::isInWebMount doesn't take page versions into account

Added by Sebastian Kurfuerst about 19 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2005-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

index.diff (852 Bytes) index.diff Administrator Admin, 2005-07-27 11:38
class.t3lib_befunc.diff (436 Bytes) class.t3lib_befunc.diff Administrator Admin, 2005-07-27 11:38

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #14471: Access / DB mount problemClosedSebastian Kurfuerst2004-12-27

Actions
Actions #1

Updated by Sebastian Kurfuerst about 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

Actions #2

Updated by Irene H¶ppner over 18 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)

Actions #3

Updated by Alexander Opitz almost 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?

Actions #4

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF