Language browser detection redirect error when there is no translation

Created on 4 July 2017, about 7 years ago
Updated 26 January 2023, over 1 year ago

I get a redirect error in the browser when viewing a node in a language, which doesn't have a translation created for that language.

Steps to re-create:
- Enable "Browser" for language detection.
- Have two languages enabled (say English as default and French as an extra) (so English shows on the site with no url prefix, but French does)
- Create a node in English (default language) with a path alias set
- Set browser to French
- Attempt to load the English page at the path alias.
- The page will not load. Instead (in Firefox for me) - "The page isn’t redirecting properly" "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

If you:
- Disable browser language detection, the page loads as normal.
- Create a translation for the browsers language (with any path alias), the content will load as expected
- View the node at it's computed path, eg; node/x the content loads as expected.

Expected behaviour
- As per the computed path, the contents source translation should load.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

9.5

Component
Language systemΒ  β†’

Last updated 1 day ago

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

πŸ‡¬πŸ‡§United Kingdom iancawthorne

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.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    This can't be reproduced currently in vanilla Drupal. If you enable language detection, and try to visit a node alias with a lang path that doesn't have a valid translation, you get a 404 because the alias doesn't exist in the given language. That's also why the 'computed path' (e.g. /{lang}/node/{nid}) works -- because this is a valid path.

    Perhaps this has changed in the meantime but I suspect more likely this was something custom/specific to this website, since there are no other reports of it.

Production build 0.71.5 2024