Path alias language doesn't changes on changing of node language

Created on 16 July 2025, 23 days ago

Problem/Motivation

when you create a node with a language, the path alias is saved with a language code. If you later change the node's language, the path alias's language code isn't updated to match the new language. This can cause the path alias not to show up when editing the node.

Steps to reproduce

  1. Create a node with a language. Let's assume the language is Japanese.
  2. Set a path alias if it is not auto-generated.
  3. Save the node.
  4. Now edit the same node and change only the language (let's assume the new language is French (FR)) of the node and save it.
  5. Now open the node in the edit form. You will see the path alias will be empty.

Proposed resolution

This issue occurs because the path alias's language doesn't update when the node's language is changed. You'll see an entry in the path_alias table with the old language code. To fix this, you need to update the path alias if the parent node's language and the path alias's language don't match.

🐛 Bug report
Status

Active

Version

1.13

Component

Code

Created by

🇮🇳India vikramsaini1609

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

Comments & Activities

Production build 0.71.5 2024