Page MenuHomePhabricator

MediaWiki:Site notice banner not showing in the appropriate language cache
Open, Needs TriagePublic

Description

MediaWiki:Site notice banner not showing in the appropriate language cache

For example, if uselang=en is set a german banner is showing up when using autotranslate or TNT.

See https://commons.wikimedia.org/w/index.php?title=MediaWiki:Sitenotice&diff=196325680&oldid=196323225

Event Timeline

Confirmed that the banner appears in German sporadically on file pages. Even when I have ?uselang=en in the url.

Sitenotice is always rendered in content language and then cached for all users. I'm not sure why the {{int:lang}} hack even worked, but as you can see it broke caching (on the bright side, it looks like it's only cached for 10 minutes). The only thing I can recommend is not doing that. :)

(For anybody looking to improve this, the code is in Skin::getSiteNotice() and Skin::getCachedNotice().)

Older bugs about the same thing: T10280 T15647 T71279 (I'm not sure if they're all the exact same problem and should be merged, so leaving them as-is for now).