Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The steps required to reproduce the bug:
- Setup a fresh drupal 8 install.
- Log in as administrator or authenticated user.
- Click on the link "My account" on the User account menu.
- Inspect the
<li>
and<a>
elements of the menu item "My account" you will notice that there are no "active" or "is-active" classes added.
The behavior expected:
The class "active" should be added to the <li>
element and the class "is-active" should be added to the <a>
element.
What happened instead:
No classes added to the <li>
and <a>
elements of the menu item.
Comments
Comment #2
TunprogComment #3
cilefen CreditAttribution: cilefen commentedComment #4
UNarmed CreditAttribution: UNarmed commentedIf i understand correctly there was a similar issue in D7 - https://www.drupal.org/node/1292590
Adding the below to my template.php fixed it for me.
Comment #5
TunprogI fixed the issue using this module menu_trail_by_path (drupal 8).
Comment #6
c7bamford CreditAttribution: c7bamford commentedComment #7
c7bamford CreditAttribution: c7bamford commentedIt's not actually related. Mb
Comment #8
BarisW CreditAttribution: BarisW at LimoenGroen commentedThis is still an issue in the current dev
Comment #10
TunprogComment #11
TunprogComment #17
darvanenBehaviour confirmed in 9.5.x
Discussing possible duplicate issues with other #bugsmash members.
Comment #18
Prem Suthar CreditAttribution: Prem Suthar at Srijan | A Material+ Company for Drupal India Association commentedany possible suggestion for this i can work on it.