URL language detection redirects to wrong node if it has same alias

Created on 19 October 2017, over 7 years ago
Updated 19 July 2023, almost 2 years ago

Hi folks,

I faced with very strange bug. I have two enabled languages on the site: Russian (set as default) and English.

I setup language detection by URL language negotiator.

And set detection by domain β€” this is important, because with path prefix bug is not presented.

Everything is working fine, but in some cases it's breaks. It's breaks when the different nodes with same alias for different languages is not translation to each other.

This node are diffirent, they not translations. Each created separately for each language but has same alias. And when user trying to access: https://emasrussia.ru/mba-programs/international-executive-mba it'w works great, but when user trying to access https://emasglobe.com/mba-programs/international-executive-mba then user will be redirected to https://emasrussia.ru/node/4.

I tried to disable Redirect module and bug is still presented, but access node/340 opens english node, but when I try to access alias, it's again redirects to /node/4 of russian version.

I also tried to update aliases β€” not helped, add language detection for content as well β€” not helped. Nothing is helping :(

Steps to reproduce:

  1. Add second language for site (maybe need to set it by default).
  2. Enable language detection by URL.
  3. Setup URL detection settings to detect language by domain (As is wrote above, with path prefix this bug can't be reproduced). And set up domains.
  4. Create nodes for both languages with same path alias.
  5. Enable caching (maybe this is important).
  6. Try to access each of this nodes. First of them (which cached first) will be shown correctly, the node for second language on the same alias but different domain, will show the same content, but if you have translation strings in templates, they will be translated, but content of the fields will be for different language.
πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
Language systemΒ  β†’

Last updated about 12 hours ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡·πŸ‡ΊRussia niklan Russia, Perm

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