Bart, as discussed:

The d8 port doesn't work in combination with the menu_block module when one sets the Maximum number of menu levels to display != unlimited .

When you set the Maximum number of menu levels to display value of a menu_block to something else than unlimited the $item['below'] value of the corresponding menu is empty. So when you try enable the first child on this menu link, this doesn't work.
The function parse(array $item) in /scr/MenuItenParser.php fails to alter the menu link to its child, which makes sense because the $item['below'] item is empty.

We should try to find an alternative implementation, inorder to get this working.

CommentFileSizeAuthor
#4 menu_firstchild-unexpanded.patch6.25 KBlammensj
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

baekelandt created an issue. See original summary.

dpacassi’s picture

I'm currently using the menu firstchild module on a D8.2.6 site with a limited maximum number of levels.
However, everything works as expected (currently having up to 3 levels in my navigation).
Maybe we should test this bug on a clean installation?

kfu’s picture

In my case the reason because it didn't fully work with menu block was that I didn't check "Show as expanded" for the parent item. Maybe this helps someone else.

lammensj’s picture

Status: Active » Needs review
FileSize
6.25 KB

Had the same issue; my link has children but does not show as expanded. Therefor, $item['below']was empty. The patch included uses the MenuLinkTreeInterface in order to determine the first child.

Cauliflower’s picture

Status: Needs review » Closed (duplicate)