Bug #105895
openMountpoints are not evaluated correctly as subpages by TMENU.IFSUB settings
0%
Description
We discovered after a TYPO3 Upgrade to the 12.4 version that the MenuProcessor dataProcessor does not render submenus if there are only mount points on the next level.
Imagine the following structure:
- Home 1 > www.domain1.com Home 2 -> www.domain2.com
- Page 1A
- Page 2A
- Page 2B -> MountPoint to Page 1A
In this case a very simple TypoScript like this:
page = PAGE
page.10 = HMENU
page.10 {
1 = TMENU
1 {
wrap = <ul> | </ul>
NO.wrapItemAndSub = <li> | </li>
expAll = 1
}
2 < .1
}
renders the correct navigation:
- Page 2A
- Page 1A
---------------
ISSUE:
---------------
If you change the TypoScript like this:
page = PAGE
page.10 = HMENU
page.10 {
1 = TMENU
1 {
wrap = <ul> | </ul>
NO.wrapItemAndSub = <li> | </li>
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="hasSub"> | </li>
expAll = 1
}
2 < .1
}
The result displayed is only:
- Page 2A
And it is handled as a NO (it does not get the hasSub class), because the isSubMenu function inside the AbstractMenuContentObject class delivers false.
This is because the "pid" for the mounted page (Home 1) is compared to the actual pid of the page (Page 2A) and this is no match of course.
The isSubMenu check is not happening if there are no "SUB-States" defined, that is why the first example works.
The MenuProcessor defines "SUB-States" automatically so it means that it can't work.
-------------------
EDITORAL WORKAROUND
-------------------
If you put a non MountPoint page in the navigation the whole block will be rendered, because then the navigation element has at least one subpage recognised.
I could reproduce this issue with a new, plain installation.
Files
No data to display