Pathauto token not working for when language is set to Not specified

Created on 29 January 2025, 2 months ago

Problem/Motivation

When creating a pathauto pattern for a node, using a system_tag token, it works fine if the node has a language selected. But when you select Not specified as language, then the token returns node000 in the token.

I would expect that it replaces the token with the alias for the language of the current node that is using the system_tag token for it's path, or if that's unavailable, use the path of the default language for the system_tag node.

Steps to reproduce

You have a site with multiple languages, in this example it is EN and NL. There you have a regular page, and a a job content type.

  1. Create a system tag, for example "Job overview" (this will automatically create the token [system_tags:node--job_overview]).
  2. Create a page node called Jobs and assign the system tag Job overview. The node id is 123 & the path alias will be /jobs in English in this example.
  3. Create a pathauto pattern for the content type Job. Use the pattern [system_tags:node--job_overview]/[node:title].
  4. Create a new Job node in English, this results in the path /jobs/page-title > This is correct
  5. Now create a new Job node where you set language to Not specified, this results in the path /node123/page-title > This is not correct

Proposed resolution

When you set the language of a node to Not specified, it should still use the English path on the English version of the site, instead of node123.
If there's no translation available for the node linked to the system tag in the active language, then it should fall back to the default language version of that node.

Remaining tasks

Fix token translation lookup.

User interface changes

/

API changes

/

Data model changes

/

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium tijsdeboeck Antwerp 🇧🇪 🇪🇺 🌎

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