MenuLinkTree.php insufficiently tests if a menu item is_expanded

Created on 6 June 2016, about 8 years ago
Updated 12 January 2024, 6 months ago

It just checks:

if ($data->hasChildren && !empty($data->subtree)) {
        $element['is_expanded'] = TRUE;
      }

but if the menu item itself has the setting "dont show as expanded", the following twig still renders the children:

{% if item.is_expanded %}

strangely enough only if that menu item is in the active trail/ active.

Using the bootstrap theme.

πŸ› Bug report
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
Menu systemΒ  β†’

Last updated 4 days ago

Created by

πŸ‡©πŸ‡ͺGermany sic

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024