Bug #99198
open
MenuProcessor returns wrong menu
Added by Oliver Schmidt almost 2 years ago.
Updated almost 2 years ago.
Category:
Fluid Styled Content
Description
Hello together,
in our pagetree we use folders in rootline to organize our multidomain typo3 instance:
- domain[0] (folder)
-- subdomain[0].domain[0] (page site_root)
-- subdomain[1].domain[0] (page site_root)
- domain[1] (folder)
-- subdomain[0].domain[1] (page site_root)
-- subdomain[1].domain[1] (page site_root)
...
At TYPO3 Version 11 the MenuProcessor returned a menu based on site_root and included only pages of the correct domain. At TYPO3 Version 12 the MenuProcessor returns a menu based on pid 0 with all root pages.
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
levels = 4
as = mainnavigation
}
}
At TYPO3 Version 11 the var leveluid:0 returned the id of site_root. At TYPO3 Version 12 the var leveluid:0 returns the folder id.
Is this a bug, or the new intended behavior? If it is intended, is there a workaround to use folders as described above?
Thank you. Greetings
Oliver
Files
Menu.JPG (34.2 KB)
Menu.JPG |
MenuProcessor Output at TYPO3 12 if site_roots are in folder |
Oliver Schmidt, 2022-11-28 06:34
|
|
MenuAsExpected.JPG (26.5 KB)
MenuAsExpected.JPG |
MenuProcessor Output at TYPO3 12 if site_roots are at root |
Oliver Schmidt, 2022-11-28 06:55
|
|
SysFolders should be normally not included, same as BE User Section. Did you by any chance set excludeDoktypes ? If yes, this got not merged. So add 6 + 254 along your other to be excluded doktypes.
Otherwise this should not happen -> see https://forge.typo3.org/issues/93924
If not, it's maybe another issue. However, I don't get that with leveluid:0 ... you do not use it in the menu processor definition.
- Related to Bug #93924: MenuProcessor does not working correctly when doktype folder added
- Status changed from New to Needs Feedback
The SysFolders aren't the problem. They are not included as expected.
Test case 1: Homepages with site_root are at root level (pid 0)
- Everything works properly and as expected
- Menu contains the subpages of the homepage of current site (see screenshot)
- The values of the vars leveluid:0 and site:rootPageId are the same, uid of homepage
Test case 2: Homepages with site_root are in folders
- Root of menu is not correct
- Menu contains homepages of both sites at first level (see screenshot)
- The values of the vars leveluid:0 and site:rootPageId differ, uid of folder and uid of homepage
Hope this information is helpful.
My current workaround for menu is:
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
special = directory
special.value.data = site:rootPageId
levels = 4
as = mainnavigation
}
}
and to use site:rootPageId instead if leveluid:0.
Also available in: Atom
PDF