#99198MenuProcessor returns wrong menu
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
Files 2
History 6
-
Stefan Bürk changed Related to #93924 <span data-processor="relativetime" data-value="2022-11-26T17:27:21+00:00" > 11/26/22, 17:27 </span>
-
Stefan Bürk changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2022-11-26T17:27:30+00:00" > 11/26/22, 17:27 </span> -
Oliver Schmidt commented and changed attached Menu.JPG attached MenuAsExpected.JPG <span data-processor="relativetime" data-value="2022-11-28T07:12:42+00:00" > 11/28/22, 07:12 </span>
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 homepageTest 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 homepageHope this information is helpful.
-
Oliver Schmidt commented <span data-processor="relativetime" data-value="2022-11-28T08:03:52+00:00" > 11/28/22, 08:03 </span>
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.
-
Benni Mack commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-10-24T07:07:26+00:00" > 10/24/26, 07:07 </span>This was a regression in TYPO3 12.0: the “local” rootline used by HMENU/ MenuProcessor (entryLevel) and getData “leveluid”/“level” ignored the root flag of sys_template and always started at pid 0. It was fixed with #98571 and is released since TYPO3 12.1.0.
On current versions the local rootline stops at the first sys_template with “Rootlevel” (root) set, or at the site root page when the site provides the TypoScript via site sets. If the template with the root flag is located on the folder above the site roots, starting the menu at the folder is the expected behaviour – move the root flag to the site root pages in that case.
Closing as resolved – please reopen if this still happens on 12.4 or later.
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.