[pp-1] Menu names are not being translated in /group/GID/menu/create

Created on 10 January 2022, almost 4 years ago
Updated 12 August 2025, 2 months ago

Problem/Motivation

When you access to /group/GID/menu/create in order to create a content related with a group, the menu name will be always shown in the language that was used when cleared the cache the last time.

There is already an issue for this https://www.drupal.org/project/drupal/issues/3038717 🐛 Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild Needs work . What we have to do is to use the TranslatableEntityLabelMarkup new class provided in this issue instead of using the menu name coming from the entity's label method.

Steps to reproduce

Add the Spanish language in Drupal
Create a menu in /admin/structure/group_content_menu_types and translate it to spanish
Configure a group type to be able to add this menu
Create a group of this type
Go to /en/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_EN)"
Go to /es/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES) " when it should be "Group menu (MENU_NAME_EN)"
Go to /es/admin and clear the Drupal cache (ensuring you are in the Spanish administration interface)
Go to /en/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES)" when it should be "Group menu (MENU_NAME_EN)"
Go to /es/group/GID/menu/create and check that the item name is "Group menu (MENU_NAME_ES) "

Proposed resolution

Use the TranslatableEntityLabelMarkup when building the plugin label in the \Drupal\group_content_menu\Plugin\GroupContentEnabler\GroupContentMenuDeriver

Note that this issue depends on https://www.drupal.org/project/drupal/issues/3038717 🐛 Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild Needs work

🐛 Bug report
Status

Postponed

Version

1.0

Component

Code

Created by

🇪🇸Spain unstatu

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