User:Krinkle/Le Tour de Wikí/2011 Resource Walker

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Le Tour de Wikí is an adventurous journey through the wiki land of the Wikimedia Foundation in which one or more developers go through all wikis.[1] The first tour starts February 2011 following the deployment of version 1.17 of the MediaWiki software on the Wikimedia wikis.

A Tour is never about speed, about only watching for things that changed recently or about scores. No. Instead Tours are about integrity, compatiblity and about improving the experience of Wikimedians and our readers.

On this page the "2011 Resource Walker" edition of the tour keeps track of the status of each wiki in relation to the tour. In short, this tour checks all wikis for proper JavaScript and CSS functionality. Things that occurr often and had to be rewritten will be posted as a snippet on mw:Snippets so that wikis we haven't checked yet can take snippets from there in advance and ofcourse for wikis outside the Wikimedia landscape. When we discover similar malfunctions on multiple wikis, they shall be listed for reference at mw:ResourceLoader/Migration guide (users).

2011 Resource Walker: Checklist[edit]

1. Don't skip any steps ;-)
2. Remember: Our goal is not just to fix anything that is currently litterly broken, just to have them brake again in a few months when the deprecated functions are removed. When a wiki is marked as OK it means there is no use of any deprecated functionality present in resources loaded by default for all users anonymous or logged-in using the Monobook/Vector skin.
3. You may want to use the jsUpdater script developed for this tour to assist in doing some of the common replacements. Of course, this automated clean up script is by no means magic and doesn't take care of everything, nor is it guaranteed to not brake things. Always test the code and check the diffs before saving the wikipage (which immediately puts it into production).

  • Browse through the wiki a bit and watch for console errors (404 errors, JavaScript errors, HTML errors?) - both Monobook and Vector (?useskin=)
  • Check the same with and without debug mode ([?&]debug=[true false])
  • Check recent activity in MediaWiki: and MediaWiki_talk: namespace:
    • Special:RecentChanges?namespace=8&hideminor=0&hideanons=0&hideliu=0&hidemyself=1&days=30&limit=100
    • Special:RecentChanges?namespace=9&hideminor=0&hideanons=0&hideliu=0&hidemyself=1&days=30&limit=100
  • Everything from mw:ResourceLoader/Migration guide (users) (like the main page tab fix)
  • Walk through the following files and verify that what is coded actually works in 2 or 3 different browsers[2]:
    • MediaWiki:Common.js (both useskin=monobook and useskin=vector!)
    • MediaWiki:Common.css (both useskin=monobook and useskin=vector!)
    • MediaWiki:Vector.js
    • MediaWiki:Vector.css
    • MediaWiki:Monobook.js
    • MediaWiki:Monobook.css
  • JavaScript loaded for all users should pass JSHint or JSLint (Check for recommended settings)
  • In doing so keep the Migration guide, JS Deprecation and Default modules in mind.
  • Some local stylesheets could use a clean up. They are sometimes formatted oddly to preserve space and therefor bandwidth and download speed. But since we have ResourceLoader, this is automatically taken care of server-side. Another common method is starting each line with a space (every line, no exception). This was done because it used to trigger <pre>-context. But that is the default now on css/js pages.
    • For example, .wikitable has been in core for a while (more about .wikitable migration). Try to keep edits separate so that local users can understand what you do (one or two things at a time, always making sure to leave a proper edit summary behind). Example.
  • Check for popular gadgets (Special:PrefixIndex/MediaWiki:Gadget). Have they been copied and pasted ? Perhaps there's a newer version at the source. Check if it is on the list of Central gadgets, if so replace the script with a mw.loader.load-call to the central location.
  • Check for any early adoptions of now in-core jQuery plugins Special:PrefixIndex/MediaWiki:JQuery. Check its usage via Search, and replace with mw.loader.load( 'jquery.foobar' ) or mw.loader.using( 'jquery.foobar', fn ) where possible
  • Some wikis define their own "importScript" function (written before it was in core: migration fix)
  • How to replace
    • If it has the same name in core, simply remove it (make sure it's not just named the same, but actually does the same with the same parameters)
    • If it has a different name in core but accepts the same syntax either:
      • Redirect the function to the new name function oldname( argA, argB ) { return newName( argB, argA ); }
      • Or do a search on the wiki searching through all namespaces (ie. MediaWiki, Project and user namespaces also) and see if the old function is used outside the script you are currently editing. If so, go for the redirect, otherwise replace all calls in the current script and get rid of the function.




  1. Depending on the tour this may not include private and/or closed wikis
  2. Depends on the code. Something in an if (Firefox) doesn't have to work in Safari, but make sure that Safari actually skips it (ie. not breaking). Recommended browsers to test with: A WebKit browser (Chrome or Safari), A Gecko browser (eg. Firefox) and Internet Explorer