Saving a view's menu item overwrites the view's original translation

Created on 5 October 2017, almost 8 years ago
Updated 10 July 2025, 23 days ago

Problem/Motivation

Site builders can edit a view's menu link directly from the menu configuration page, e.g. admin/structure/menu/manage/main. Doing this while having the interface language set to a language other than the view's original language can cause the view's configuration to be overwritten with values from its translation, causing loss of the original language texts.

The bug can be replicated in a clean Drupal 8.4.x-Install with the following steps:

  1. Enable views and config_translation modules
  2. Add a second language
  3. Create a view with a page display and a menu link in some language
  4. Add a translation for the view in a second language
  5. Visit the menu configuration with the interface set to that second language, edit and save the view's menu link
  6. The view's original language texts are overwritten with the text for the second language

Proposed resolution

Most likely, the edit form simply loads the configuration for the view in question, which applies all translation strings by default. When the link is saved, the whole view is updated, and the translated strings are saved into the original configuration.

As a workaround for now, it's possible to just create custom menu links pointing to your view pages instead of letting views create your menu links.

Remaining tasks

We need a test replicating this bug, and a patch fixing it and passing the test.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

views.module

Created by

πŸ‡©πŸ‡ͺGermany Mirroar

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany jan kellermann

    jan kellermann β†’ made their first commit to this issue’s fork.

  • Merge request !12678Resolve #2914124 "Saving a views" β†’ (Open) created by jan kellermann
  • Pipeline finished with Failed
    23 days ago
    Total: 566s
    #543853
  • Pipeline finished with Failed
    23 days ago
    Total: 116s
    #543873
  • Pipeline finished with Failed
    23 days ago
    Total: 540s
    #543902
  • Pipeline finished with Failed
    23 days ago
    Total: 647s
    #543928
  • Pipeline finished with Failed
    22 days ago
    Total: 412s
    #543958
  • Pipeline finished with Success
    22 days ago
    Total: 412s
    #544003
Production build 0.71.5 2024