Navigation sidebar not expanding sub-links automatically

Created on 13 February 2024, 4 months ago
Updated 2 April 2024, 3 months ago

Problem/Motivation

The "Side Navigation" block has an option to "Expand all menu links". The expectation is that upon selecting this checkbox, any sub-menu items will become visible in the side navigation. The actual behaviour is that only 1st-level menu items remain visible, even if navigating to the pages of levels 2, 3 or deeper, only the level 1 menu link remains visible.
The only way to solve this issue currently is to manually navigate to the Primary navigation menu and edit every menu link, selecting the "Show as expanded" checkbox.

This is how Side Navigation block is configured at the time of issue observation:

Below is the screenshot of a page, attached as Level 3 menu link, which outlines the problem.

Steps to reproduce

Install the vanilla Drupal site and follow the steps to activate the CivicTheme.
Create 3 or more pages and add them to the Primary Navigation menu via the node form. Ensure they are chained together as child/parent. Example menu structure:
- Level 1 page
-- Level 2 page
--- Level 3 page
---- Level 4 page

Navigate to the frontend and only the Level 1 page menu link is visible. Navigate to all of the pages one by one to see that only the Level 1 page link is showing in the Side Navigation block.

Proposed resolution

Upon saving of block configuration, all current and future menu items become expanded and visible in the side navigation. Upon deselecting of that same checkbox, the behaviour reverses.

Remaining tasks

TBD

User interface changes

TBD, but none expected.

API changes

None expected.

Data model changes

None expected.

🐛 Bug report
Status

Fixed

Version

1.6

Component

Code

Created by

🇦🇺Australia ivrh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024