Bug #99198
openMenuProcessor returns wrong menu
0%
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
Updated by Stefan Bürk almost 2 years ago
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.
Updated by Stefan Bürk almost 2 years ago
- Related to Bug #93924: MenuProcessor does not working correctly when doktype folder added
Updated by Stefan Bürk almost 2 years ago
- Status changed from New to Needs Feedback
Updated by Oliver Schmidt almost 2 years ago
- File Menu.JPG Menu.JPG added
- File MenuAsExpected.JPG MenuAsExpected.JPG added
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.
Updated by Oliver Schmidt almost 2 years ago
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.