Remove the language query string when using session language switch links

Created on 2 June 2010, almost 14 years ago
Updated 29 August 2023, 9 months ago

Problem/Motivation

If the session language provider is enabled and page cache is enabled (and #815526: Session language switcher prevents pages from being cached is fixed), we can have duplicate page cache entries for the same content because the language switcher block appends the language query string parameter even for the default language link. If no language parameter is found we may fall back to the default language and thus having the same content for, say, http://example.org/ and http://example.org/?language=en.

Proposed resolution

Fix the issue by forbidding query string language parameters when page cache is enabled and the parameter value matches the default language.

Original report by @plach

🐛 Bug report
Status

Needs work

Version

9.5

Component
Language system 

Last updated about 21 hours ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇮🇹Italy plach Venezia

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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.69.0 2024