#103017MenuProcessor is not showing access restricted pages, when all subpages are access restricted
Description
Hello,
I user the MenuProcessor to generate a menu that shows also access restricted pages.
Code looks like this:
11 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
11 {
levels = 3
includeSpacer = 1
as = mainNavigation
showAccessRestrictedPages = 1
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = media
as = navIcon
}
}
}
Now I have a Page “Products & Materials” that is not protected.
This page has two Subpages: “Shop” and “Materials”, that are access protected.
The Menu is rendering “Products & Materials” but does not show the childrens “Shop” and “Materials”.
As soon as I add at least one subpage that is not access protected,
all children will get rendered as they should.
Reviews 2
History 512
-
Oliver Schmidt commented <span data-processor="relativetime" data-value="2024-02-12T11:33:01+00:00" > 02/12/24, 11:33 </span>
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2024-07-31T09:42:48+00:00" > 07/31/24, 09:42 </span>
-
Lars Peter Søndergaard commented <span data-processor="relativetime" data-value="2024-10-09T09:45:20+00:00" > 10/09/24, 09:45 </span>
I took a look at it, and the issue seems to be in the method:
\TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isSubMenuSpecifically the part:
if (!is_array($cachePagesNextLevel)) { $cachePagesNextLevel = $this->sys_page->getMenu($pageIdsOnSameLevel, 'uid,pid,doktype,mount_pid,mount_pid_ol,nav_hide,shortcut,shortcut_mode,l18n_cfg'); $runtimeCache->set($cacheIdentifierPagesNextLevel, $cachePagesNextLevel); }Is not passing in
$this->disableGroupAccessCheckas last argument togetMenu.Adding it seems to fix this particular issue.
I only tried it by X-Classing the TextMenuContentObject class, so would be great if someone could fix it in actual core.
Greetings
Lars -
Gerrit Code Review pushed patch set 1 for main to change 88601 status
NewUnder Review <span data-processor="relativetime" data-value="2025-03-16T09:22:29+00:00" > 03/16/25, 09:22 </span> -
Gerrit Code Review pushed patch set 2 for main to change 88601 <span data-processor="relativetime" data-value="2025-03-27T19:39:33+00:00" > 03/27/25, 19:39 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 88601 <span data-processor="relativetime" data-value="2025-03-27T19:40:30+00:00" > 03/27/25, 19:40 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 88601 <span data-processor="relativetime" data-value="2025-03-27T21:31:00+00:00" > 03/27/25, 21:31 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 88601 <span data-processor="relativetime" data-value="2025-03-27T21:31:51+00:00" > 03/27/25, 21:31 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 88601 <span data-processor="relativetime" data-value="2025-03-27T21:52:16+00:00" > 03/27/25, 21:52 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88824 <span data-processor="relativetime" data-value="2025-03-28T12:16:34+00:00" > 03/28/25, 12:16 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-28T12:20:08+00:00" > 03/28/25, 12:20 </span>Applied in changeset commit:5a2f4ffe4aa73d737bacc21af2308d7a77805cca.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:37:04+00:00" > 08/12/25, 14:37 </span>
I have the same issue. A fix would be nice.