Translating path aliases in workspace does not work

Created on 11 November 2024, 6 months ago

Problem/Motivation

When changing the language an existing path alias inside of a workspace, the path alias stops working.

Steps to reproduce

1. drush si
2. drush en -y workspaces content_translation
3. drush uli
4. Go to /admin/config/regional/language and add the Spanish language
5. Go to /admin/config/regional/content-language and enable translation for "Content", ensure to check "Article" under the "Content" fieldset
6. Add a new article node, and set the path alias to /test before saving it
7. Save the node
8. Switch to the staging workspace
9. Go to /admin/config/search/path/edit/1 and update the path alias to use "Not specified" language, save it.
10. Go to /test

See a 404 page.

Proposed resolution

The second proposed solution here 🐛 Improve performance for path_alias queries in a workspace Active should be reverted. That additional language condition causes the repository to not find a matching path alias if the langcode in the base & revision tables is different. This essentially means that changing the language of a path alias in a workspace does not work.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

workspaces.module

Created by

🇸🇮Slovenia alecsmrekar

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024