Node URL Tokens does not respect current language during language fallback condition

Created on 6 October 2022, almost 3 years ago
Updated 27 June 2025, 24 days ago

Problem/Motivation

This #3077442 feature implementation in the version 8.x-1.20 is causing issue during the language fallback condition for Node URL tokens. For example. A node is created in "en" language and user is visiting in "de" language for which node translation is not created. If we use [node:url] token or [current-page:url] Token in metatag we should get url as per "de" language but due to this #3077442 feature being added in version 8.x-1.20 of this module, the Node URL which is getting generated through token in metatag is as per "en" language.

Steps to reproduce

  1. Create a node
  2. Add [node:url] token or [current-page:url] in Metatag
  3. Visit the node and check if the URL appearing in Metatag of correct language
  4. Visit the node in other language whose translation is not available and fallback is set as original language
  5. Check Node URL appearing in Metatag is of correct language or is of fallback language

Expected result: Node URL in metatag should appear as per the current language
Actual Result: If node translation is not available for current language, Node URL in Metatag is appearing as per the fallback language.

🐛 Bug report
Status

Active

Version

1.21

Component

Code

Created by

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

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