It is possible to use the same alias for different nodes in the non-default language

Created on 31 October 2019, about 5 years ago
Updated 4 July 2023, over 1 year ago

Problem/Motivation :

Hello,
I didn't find any issue talking about my problem, so I declare it here.
I found a way to create same alias for 2 different nodes.

Steps to reproduce the issue
Install from scratch drupal 8.8.0-alpha1 (or maybe others versions of drupal core).
Enable the Language module.
Create a content type A with default language 'Not specified' or 'Not applicable'
Create a content type B with default language 'English' (or any other language of your drupal site)
Create a node A of content type A with for example '/test' as alias
Create a node B of content type B with the same alias

Drupal allows it : I have now 2 nodes with the same alias and I cannot access to my node A anymore. (even trying to access via /node/nid, beacause I'm redirected to the alias)

Proposed resolution

On the alias creation, drupal just checks if this alias isn't already taken in the current language.
I think it shoulds also checks in 'und' language.
I could purpose a patch about it but I would like have your opinions first.

Thanks,

NB: Same problem with pathauto (contrib module) but I think they use the same checks as core.

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Path 

Last updated 19 days ago

  • Maintained by
  • 🇬🇧United Kingdom @catch
Created by

🇫🇷France Quentin Massez

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.

Production build 0.71.5 2024