Bug #103017
openMenuProcessor is not showing access restricted pages, when all subpages are access restricted
0%
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.
Updated by Oliver Schmidt 9 months ago
I have the same issue. A fix would be nice.
Updated by Lars Peter Søndergaard about 1 month ago
I took a look at it, and the issue seems to be in the method:
\TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isSubMenu
Specifically 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->disableGroupAccessCheck
as last argument to getMenu
.
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