Edit Items Link Not Respecting Current Language Context

Created on 7 July 2024, 6 months ago
Updated 26 August 2024, 4 months ago

Problem/Motivation:
The “Edit items” link in the Entityqueue module does not respect the current language context when used on a multilingual site. The redirection is based on the langcode in the module’s configuration file (.yml), which is set to the language in use when the entity queue was created. This causes the link to always redirect to that language version of the page regardless of the current language setting.

Steps to Reproduce:

1. Set up a multilingual Drupal site with the Entityqueue module.
2. Create an entity queue while using a non-default language (e.g., Arabic /ar).
3. Navigate to the admin page of the entity queue in a different language from the one used during creation (e.g., /en/admin/structure/entityqueue).
4. Click on the “Edit items” link.

Expected Behavior:
The “Edit items” link should redirect to the edit page in the current language (e.g., /en/admin/structure/entityqueue.).

Actual Behavior:
The “Edit items” link redirects to the page in the language used during the creation of the entity queue (e.g., /ar/admin/structure/entityqueue).

Proposed Resolution:
The link generation should respect the current language context. The following patch changes ensure that the URL for the “Edit items” link includes the correct language context

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇸🇦Saudi Arabia mesharideb

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

Comments & Activities

Production build 0.71.5 2024