Bug #63408
closedWrong rootline returned by RootlineUtility::generateRootlineCache()
0%
Description
When a subpage is mark as Site Root (columns is_siteroot)
The generateRootlineCache do not take care of the is_siteroot field and generate rootline until pid=0.
--[0] TYPO3
----[1] Website 1 : is_siteroot = 1
----[2] Website 2 : is_siteroot = 1
----[3] Microsite (for site factory) : is_siteroot = 0
--------[4] microsite 1 : is_siteroot = 1
--------[5] microsite 2 : is_siteroot = 1
For pid 1 and 2 rootline stop at respectively : 1 and 2
For pid 4 and 5 rootline continu and return pid 3 as root.
Correct value should be respectively : 4 and 5
Correction:
in TYPO3\CMS\Core\Utility for the class : RootlineUtility: modify function : generateRootlineCache line 360 : - $parentUid = $page['pid']; + $parentUid = $page['is_siteroot'] == 1 ? 0 : $page['pid'];
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from next-patchlevel to 7.1 (Cleanup)
Updated by Mathias Schreiber almost 10 years ago
- Status changed from New to On Hold
- Assignee changed from Christophe Monard to Mathias Schreiber
Hi Christophe,
This would be clearly a change in behavior.
See, I would expect to get the rootline up until pid 0.
Could you describe your usage scenario a bit more so I can come up with a solution?
I imagine something like having a setting (TS or per-instance) to toggle the behavior.
Cheers
Mathias
Updated by Christophe Monard almost 10 years ago
Hi Mathias,
We need a toggle to tell the getrootline function to stop when it find a is_siteroot=1 in pages properties.
We handle with 1 plateform, a huge number of sites. They share a lot of library (TS / PHP) and few of them use the rootline to get some informations
eg:
--[0] TYPO3 ----[1] Main site : is_siteroot = 1 --------[2] menu 1 ------------[4] submenu 1 --------[3] menu 2 ----[5] Microsite (eg. for site factory) : is_siteroot = 0, used as storage for all generated micro sites --------[6] microsite 1 : is_siteroot = 1 ------------[8] menu 1 ----------------[10] submenu 1 ----------------[11] submenu 2 ------------[9] menu 2 --------[7] microsite 2 : is_siteroot = 1 ------------ ... etc.
the library ask for an rootline elements when viewing page 4 (submenu 1)
eg:
10 = TEXT 10 { data = leveltitle:1 wrap = <p class="title">|</p> }
This return the pid 2 title as expected.
But when you use the same TS when viewing page 10. It didn't return pid 8 title, but the pid 6 which is a mistake. when debuging the generated rootline, we can see that the returned array contain pid 5 as root. It should have stop recursion at pid 6.
Rootline generated for pid 10
eg.
array ( "5" => array(), "6" => array(), "8" => array(), "10" => array(), );
The first element shouldn't be there.
Cheers,
Christophe
Updated by Mathias Schreiber almost 10 years ago
Hey Christophe,
thanks for taking the time to clear up, it's appreciated.
I hope we can come up with a solution soon.
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Oliver Hader almost 9 years ago
- Complexity changed from no-brainer to nightmare
Updated by Christophe Monard almost 9 years ago
Maybe the best option will be to add another function in getData and add a parameter in this one to enable us to select "relative" or "absolute" rootpath ?
Updated by Susanne Moog about 7 years ago
- Status changed from On Hold to Accepted
- Assignee deleted (
Mathias Schreiber)
Updated by Benni Mack over 4 years ago
- Status changed from Accepted to Needs Feedback
Hey,
can you verify if this issue still occurs? we introduced Site Handling in TYPO3 v9 and this should be handling the site identifiers instead.
Updated by Benni Mack over 4 years ago
- Status changed from Needs Feedback to Closed
Closing this issue due to lack of feedback, if you have more info, let me know, so I will reopen the ticket.