Bug #18722
closed"Broken rootline" error when creating new page in Draft
Added by John Angel over 16 years ago. Updated about 11 years ago.
0%
Description
When making new page in Draft Workspace using Wizard (New Record/Page(inside)/Click here for wizard), Typo3 always reports:
"Error: The requested page didn't have a proper connection to the tree-root! (Broken rootline)".
When not using Wizard (New Record/Page(inside)) this Error doesn't happen.
It seems the problem is in typo3/sysext/cms/tslib/class.tslib_fe.php:1050
$ws = $this->whichWorkspace();
Function whichWorkspace doesn't return correct $ws value because $this->beUserLogin == 0!?
This is quick workaround, but not the solution:
$ws = $GLOBALS['BE_USER']->workspace;
It should be investigated why $this->beUserLogin is zero.
(issue imported from #M8280)
Files
patch_8280_v42x_brokenRootline.diff (566 Bytes) patch_8280_v42x_brokenRootline.diff | Administrator Admin, 2009-06-16 12:05 | ||
patch_8280_v43x_brokenRootline.diff (566 Bytes) patch_8280_v43x_brokenRootline.diff | Administrator Admin, 2009-06-16 12:05 |
Updated by Jens Cramer over 16 years ago
There is the same error when you create a new page in draft workspace and in custom workspaces.
This problem relates to the use of realurl.
The class class.tx_realurl_tcemain.php:320 calls the function $GLOBALS['TSFE']->getPageAndRootline() in the class tslib_fe.
This function calls the function $ws = $this->whichWorkspace() which returns "false" because $this->beUserLogin==0 although a workspace should be identified by $GLOBALS['BE_USER']->workspace.
TYPO3 Version: 4.2.1
RealURL Version: 1.3.3 and 1.4.0
Updated by marco bamert about 16 years ago
I have the same problem with RealURL 1.5.1.
Updated by d.ros no-lastname-given about 16 years ago
RealURL 1.5.2
T3: 4.2.2
PHP Version 5.2.5
Problem still present.
Updated by Marcel Greter over 15 years ago
We also have this Problem when we change a Page-Title (while beeing in the custom Draft Workspace). Tried to look into the Problem, but it seems not to be an easy fix.
Jens Cramer is right about $this->beUserLogin being false. If I looked correctly, this is normally set in index_ts.php (BE_USER). I tried to copy the initialization code from there, but got some other error. I didn't look further as I have not enough knowledge about the internal concepts of workspaces/be_user/fe vs. be
The fix from Jens seems to be working. Does anyone know if there could arise some other problems because of this change? I implemented the fix directly in the whichWorkspace function. Do you see any reason not to do it there and to only fix the getPageAndRootline function?
- typo3/sysext/cms/tslib/class.tslib_fe.php @ 4164
if ($this->doWorkspacePreview()) {
$ws = intval($this->workspacePreview);
} elseif ($this->beUserLogin) {
$ws = $GLOBALS['BE_USER']->workspace;
+ } elseif ($GLOBALS['BE_USER'] && $GLOBALS['BE_USER']->workspace) {
+ $ws = $GLOBALS['BE_USER']->workspace;
} else return FALSE;
Typo3: 4.2.7
RealURL: 1.5.3
Updated by Tobias Liebig over 15 years ago
i've debugged the issue
It only occures when realurl is in use and you create a page using the wizard or updating the page title.
The difference when using the wizard instead of the simple "create page" is, that the wizard makes an "update".
RealUrl uses the hook "processDatamap_afterDatabaseOperations" in t3lib_tcemain. Whenever a record is "updated", realurl creates a faked TSFE to get the current rootline.
Realurl does not set the beUserLogin flag. Thus the $ws wont be set correct.
i tried to set the beUserLogin flag in the faked TSFE, but unfortunately it fails.
So i think Marcels Bugfix works best, even if i think it's an realurl issue rather then an core issue.
i'm preparing a patch and post it in the core list...
Updated by Sergii Khomenko over 15 years ago
Typo3 4.2.6
RealURL disabled
PHP 5.1
I just tried to apply teh patch as suggested, so the code of the functiuon look like:
function whichWorkspace($returnTitle = FALSE) {
if ($this->doWorkspacePreview()) {
$ws = intval($this->workspacePreview);
} elseif ($GLOBALS['BE_USER'] && $GLOBALS['BE_USER']->workspace) {
$ws = $GLOBALS['BE_USER']->workspace;
} else return FALSE;
if ($returnTitle) {
if ($ws===-1) {
return 'Default Draft Workspace';
} else {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title', 'sys_workspace', 'uid='.intval($ws));
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
return $row['title'];
}
}
} else {
return $ws;
}
}
The error is still there. It shows up when new version of a page is created when modifying page properites like page type or title.
Is there a resolution to this issue yet?
Thank you very much
Sergii
Updated by Helmut Hummel almost 15 years ago
This problem is solved for me with realurl 1.7.0
Updated by Sergii Khomenko almost 15 years ago
Just tried to check if realurl update to 1.7.0 solves the issue.
My software is:
Typo3 4.2.10
RealUrl 1.7.0
PHP 5.1.2
The problem is still not resolved, the steps to reproduce:
1. Change workspace from Live to Draft
2. Try to modify a page
3. Get an error screen saying;
"The requested page didn't have a proper connection to the tree-root!
(Broken rootline)"
Sergii
Updated by Tobias Liebig almost 15 years ago
i can reproduce the error in 4.2.10 and 4.2.11-dev (both without the patch)
it seems to be fixed when i apply the patch "patch_8280_v42x_brokenRootline.diff "
i cannot reproduce the behaviour in 4.3.0-dev (current trunk)
Helmut: which TYPO3-Core did you test? i guess 4.3.0
Updated by Tobias Liebig almost 15 years ago
Benni Mack figured out that the same error occurred, when you create a new version while you are in the "Live"-Workspace and then try to edit the title.
So we have two cases:
1) edit the title of the page in the draft workspace
2) create a ne version in the live-workspce and then edit the title
Case 1 is solved by the patch.
Case 2 is still open, i'll debug that
Updated by Tobias Liebig almost 15 years ago
i tried to debug case 2 and i found a "workaround". But i'm not sure if it won't break anything regarding Versioning/Workspaces.
So i think we should handle these two cases separately.
i'll create a new issue for case 2 and send a reminder in the core list for the patch for case 1
Updated by Sergii Khomenko almost 15 years ago
Hi Everyone,
Just checked if the error still present on typo3 4.3.0. Following the same steps:
1. Change workspace from Live to Draft
2. Try to modify a page
3. Get an error screen saying;
"The requested page didn't have a proper connection to the tree-root!
(Broken rootline)"
Applying the attached patch now with following commands:
[~/public_html/www]# cd typo3_src-4.3.0/
[~/public_html/www/typo3_src-4.3.0]# patch --dry-run p1 < ../patch_8280_v43x_brokenRootline.diff
|Index: typo3/sysext/cms/tslib/class.tslib_fe.php
|===================================================================
|--- typo3/sysext/cms/tslib/class.tslib_fe.php (Revision 5596)
|+++ typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------------------------
--------------------------
File to patch:
Am I missing anything?
Thank you
Updated by Tobias Liebig almost 15 years ago
try "patch --dry-run -p0" instead of "patch --dry-run -p1"
Updated by Tobias Liebig almost 15 years ago
the patch is still not commited (pending for review in the core list). Thus it was not shipped in 4.3.0
Updated by Sergii Khomenko almost 15 years ago
Thanks Tobias, p0 made it successfully. However, it hasn't fix the problem unfortunately, the bug is still there.
Updated by Chris Mueller almost 15 years ago
I had the problem with "broken rootline" as a "normal" user when editing a draft record and changing the title. An update to RealURL version 1.7.0 fixed that problem. I am using TYPO3 4.2.10.
Updated by Helmut Hummel almost 15 years ago
I can also confirm that realurl 1.7.0 fixes this issue. I'd say this can be closed now
Updated by Sergii Khomenko almost 15 years ago
Strange, on one 4.2.10 installation, realurl update to 1.7.0 fixed the problem, on the other didn't.
4.3.0 is not fixed with realurl 1.7.0
Updated by Bart Veldhuizen over 14 years ago
I'd like to confirm that on 4.2.12 and realurl 1.8.1, I'm still seeing this problem.
Updated by Stefan Galinski over 11 years ago
- Status changed from Accepted to Needs Feedback
- Target version deleted (
0)
Updated by Alexander Opitz over 11 years ago
Does this problem exists in newer versions of TYPO3 CMS (6.1)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
No feedback for over 90 days.