Bug #19076
closedtypolink check rootline for trees under a page
0%
Description
The sys_page->getRootline function just stops if pid 0 is found.
The root of a tree is not always the page 0.
e.g.
typo3(0)
-rootpage
--domain1
--domain2
this causes the behaviour that typolink between domains even with the flag config.typolinkLinkAccessRestrictedPages do not work.
Solution:
the rootline parsing should end in this case if the flag "is_siteroot" is set.
Index: class.tslib_content.php
===================================================================
--- class.tslib_content.php (revision 1208)
++ class.tslib_content.php (revision 1218)@ -5223,6 +5223,7
@
// This checks if the linked id is in the rootline of this site and if not it will find the domain for that ID and prefix it:
$tCR_rootline = $GLOBALS['TSFE']->sys_page->getRootLine($page['uid']); // Gets rootline of linked-to page
$tCR_flag = 0;
foreach ($tCR_rootline as $tCR_data) {
if ($tCR_data['uid']==$GLOBALS['TSFE']->tmpl->rootLine0['uid']) {
$tCR_flag = 1; // OK, it was in rootline!@ -5228,6 +5229,12
@
$tCR_flag = 1; // OK, it was in rootline!
break;
}
+ //stop if is_siteroot
+
+ if ($tCR_data['is_siteroot']==1) {
+ break;
+ }
+
}
if (!$tCR_flag) {
foreach ($tCR_rootline as $tCR_data) {
(issue imported from #M8925)
Updated by Christopher Hlubek almost 16 years ago
This is definitely fixed in 4.2.1, but see 9046 for an issue regarding this fix.