Page MenuHomePhabricator

[Regression] mediawiki.toc.js: show/hide toggle missing on many pages in wmf-production
Closed, ResolvedPublic

Description

https://en.wikipedia.org/wiki/New_Zealand_European

mw.loader.getState('mediawiki.toc')
"registered"

mw.loader.getVersion('mediawiki.toc')
"20140502T152855Z"

mw.loader.getVersion('mediawiki.util')
"20140501T184229Z"

mw.loader.moduleRegistry['mediawiki.util']
Object {version: 1398969749, dependencies: Array[3], group: null, source: "local", state: "ready"…}

mw.loader.moduleRegistry['mediawiki.util'].dependencies
["jquery.client", "jquery.mwExtension", "mediawiki.notify"]

mw.util.init
function (){util.$content=(function(){var i,l,$content,selectors;selectors=['.mw-body-primary','.mw-body','#bodyContent','#mw_contentholder','#article','#content','#mw-content-text','body'];for(i=0,
l=selectors.length;i<l;i++){$content=$(selectors[i]).first();if($content.length){return $content;}}return util.$content;})();}

As of https://github.com/wikimedia/mediawiki-core/commit/d7a40c8c8ae5b15907787443946d46cf77713e27#diff-a0826ebc584f93f08f0de55899ca3e89R197,

that should have "mediawiki.util" in its dependencies.

Looks like only half of that change got deployed. The init code from mw.util was removed, but the dependency never made it.


Version: 1.23.0
Severity: major

Details

Reference
bz64765

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:09 AM
bzimport set Reference to bz64765.
Krinkle created this task.May 2 2014, 7:31 PM

For comparison, it should be:

mw.loader.getState('mediawiki.toc')
"ready"

And in the page html:

<script> .. mw.loader.load(["ext.cite","mediawiki.toc", ...

So d7a40c8c8ae5b1590 moved it into a separate module and made it a dependency. That change did actually get deployed correctly.

Then later If0438b7b6f4649 changed it from a dependency for mediawiki.util in general to something added by the parser's module load queue. Which means that from that point on, not a single page globally has this module anymore until a full re-parse happens (which only happens when it is manually edited or purged).

Change 131124 had a related patch set uploaded by Krinkle:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131124

To reproduce: Browse around on en.wikipedia.org (logged-in or not, either is fine). For the the majority of pages were lacking the module.

Change 131200 had a related patch set uploaded by Krinkle:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131200

Change 131201 had a related patch set uploaded by Krinkle:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131201

Change 131124 merged by jenkins-bot:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131124

Change 131201 merged by jenkins-bot:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131201

Change 131200 merged by jenkins-bot:
Restore mediawiki.toc dependency on mediawiki.util

https://gerrit.wikimedia.org/r/131200