Page MenuHomePhabricator

wgMFMode lies
Closed, ResolvedPublic

Description

Due to a refactor of config variables as a result of bug 44133 I stupidly put wgMFMode inside the resource loader javascript module instead of in the page HTML. Since javascript doesn't vary in alpha/beta/stable this means the value caches and cannot be relied on.

More on this after I've applied a live hack..


Version: unspecified
Severity: normal

Details

Reference
bz48490

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:37 AM
bzimport set Reference to bz48490.

Stable pages are more likely to be cached so in theory the major damage this causes is that EventLogging data will be wrong whilst this bug is in place in that it might report an event happened in alpha when it happened in stable.

Added live hack: https://en.m.wikipedia.org/wiki/MediaWiki:Mobile.js
Page HTML does vary. I think we should set the config variable this way in application.js and not add it via the hook.

As a result hopefully damage is minimal.

Note this doesn't cause alpha or beta modules to get added to stable - it simply has side effects to code which is not properly sandboxed. Potential problems that might arise due to lack of sandboxing:

  • The edit button code is in stable and relies on wgMFMode to decide whether to show. As a result there is a chance logged in users might see an edit link on stable (anon users luckily won't)
  • Nearby watchlist star may or may not show
  • A logged in user might see a toast message welcoming him/her to the site
  • Unified diffs might possibly show in stable.
  • The nag overlay might show in stable

Fix on way...

Related URL: https://gerrit.wikimedia.org/r/63822 (Gerrit Change Ic5f45299e57fa55f1b95ca1753a488b9c4bf7b18)

(In reply to comment #1)

Stable pages are more likely to be cached so in theory the major damage this
causes is that EventLogging data will be wrong whilst this bug is in place in
that it might report an event happened in alpha when it happened in stable.

For the record, stable pages are the ONLY pages that get cached - if you're in alpha or beta, you *always* bypass mobile varnish caching.

https://gerrit.wikimedia.org/r/63822 (Gerrit Change Ic5f45299e57fa55f1b95ca1753a488b9c4bf7b18) | change APPROVED and MERGED [by jenkins-bot]