Page MenuHomePhabricator

Option to disable automatic language detection for anonymous users
Closed, ResolvedPublic

Description

ULS should have an option to disable language detection for anonymous users, in a way that

a) applies no language detection and instead uses the content language
c) initially does not set (and if necessary, deletes) any ULS cookies
b) but still shows the ULS widget to anonymous users
d) sets an ULS cookie if and when the user selected a language manually using the ULS widget (or by using the setlang=xx URL parameter).

This was suggested by Erik Möller as a solution to bug 41451, see comment 47 there. It allows ULS to be used an environment such as the Wikimedia cluster, where web caches are used, and these caches can be configured to not cache responses to queries the contain specific cookies.

This is a nicer, but less robust, approach than bug 42157.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=41451
https://bugzilla.wikimedia.org/show_bug.cgi?id=42157

Details

Reference
bz42159

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:08 AM
bzimport set Reference to bz42159.

Wo probably need to send some additional cache control headers. So:

e) if the ULS cookie is received (or being set), send cache-control headers that cause squid not to cache the response.

One important part of the solution (and possibly the only thing needed) would be to set

$wgCacheVaryCookies[] = 'language';

This was fixed in Ia8d21c394ff5efac0ce94664710c97dc3b74ec18

$wgULSAnonCanChangeLanguage and $wgULSLanguageDetection are available.

Closed older resolved bugs as verified.