Active trail always set to homepage on multilingual setup

Created on 24 August 2021, over 3 years ago
Updated 6 April 2023, over 1 year ago

Steps te reproduce

Have at least 2 languages setup with a path prefix in the language detection and 2 different menu's rendered on the page.

Create a homepage in both languages and add the homepage as menu item to menu 1.
Create a second page in a language and add it to menu 2.

The active trail in menu 1 is set to the homepage, which is incorrect.
The active trail in menu 2 is set to the current page, which is correct.

Attached is a patch that filters out the language prefix from the path_elements array. As that is the cause of this behaviour. As far as I understand the modules logic, any possible language prefix should not be in the path_elements array as it just confuses the active trail calculation.

With this patch I still have the issue that the active trail for the homepage now doesn't work anymore... Not sure how to fix that.

🐛 Bug report
Status

Closed: duplicate

Version

1.3

Component

Code

Created by

🇧🇪Belgium weseze

Live updates comments and jobs are added and updated live.
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.71.5 2024