Node info is localized in the menu router when clearing cache in a non-English language

Created on 19 May 2016, over 8 years ago
Updated 28 August 2023, about 1 year ago

Problem/Motivation

When clearing the menu cache, a menu item is added for each node type. The node info that is added through module_invoke however is localized in the current language. This means the menu router table entries contain the localized names and descriptions for each node type.

Related issue: #714438: Cache flush deletes menu item translation

Proposed resolution

When rebuilding the available node types, override the current language to English to the menu router is rebuilt with the correct node type information. This approach is similar to what the Features module does when creating exports: #1988252: Use the same language consistently in generated comments and strings

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

Node > Add content menu items are correctly localized.

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
Menu system 

Last updated 1 day ago

Created by

🇳🇱Netherlands idebr

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.71.5 2024