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

/

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tijsdeboeck created an issue. See original summary.

lammensj made their first commit to this issue’s fork.

lammensj’s picture

Version: 3.0.2 » 3.0.x-dev
Status: Active » Needs review

@tijsdeboeck, could you check if the provided solution works for you?

lammensj’s picture

  • 8c44d945 committed on 3.0.x
    [#3503005] Lookup an alias for the default language of the site
    
lammensj’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.