Problem/Motivation

Currently i18n_menu excludes menu items marked as hidden from the translation handling.
As good as the idea is in a performance perspective it turns out to be problematic in regarding the core breadcrumbs behaviour.
The breadcrumbs handling by core doesn't seem to respect the hidden flag and always returns all items.

This can lead to missing translation when a hidden menu item is displayed.

Proposed resolution

Don't skip the translation processing for menu items marked as hidden.

Remaining tasks

Do we need to profile this?
Reviews needed.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

das-peter created an issue. See original summary.

das-peter’s picture

I'm a bit concerned about the performance implications and / or backward compatibility.
Thus a viable adjustment to this could be to toggle the behaviour using an additional variable.

schnitzel’s picture

Fully agree, we had that issue as well before!
Not sure where exactly this could cause a BC break? Maybe that order:
1. menu link set to not hidden
2. menu link translated
3. menu link set to hidden
4. menu link is not translated (but also not shown)
5. i18n_menu update
6. now menu link is translated

but as the menu link is never shown while being hidden it's not a big problem right?

schnitzel’s picture

Status: Needs review » Reviewed & tested by the community

but I really don't see a problem, RTBC

das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the fast feedback, highly appreciated :) Just committed the change.
If there's a performance issue we can still integrate a opt-out setting.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.