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

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

Wiki Tour 2011: Resource Walker (February 2011 - present) is the first instance of Le Tour de Wikí. The tour started following the Wikimedia deployment of MediaWiki 1.17. This page documents the steps involved and the current status. In short, this tour checks all wikis for proper JavaScript and CSS functionality.

Reference material[edit]

  • Migration guide: This page lists many major changes relating to MediaWiki javascript over the years. Many customisations found on wikis can be safely removed as being entirely obsoleted by functionality now native to MediaWiki. For example, one would use JavaScript conditional to run on the Main Page, to find the namespace tab and change its label from "Article" to "Main Page" (see Migration guide#mainpage-nstab). This label change now happens in the wiki software on the server.
  • Snippets: Many wikis copied large chunks of code from one another to implement similar functionality. Now that several years have passed, they all need to be individually migrated away from any deprecated or removed methods they might still refer to. To avoid a lot of duplicate effort, always consult the Snippets repository on as someone has likely already migrated a copy of the same function before. If you discover similar malfunctions on multiple wikis, be sure to add them there.


You may want to use the jsUpdater script developed for this tour to assist in doing some of the common replacements automatically. This automated clean up script is not magic. Always carefully review and test changes to ensure no code was broken.

  • Use the Developer Tools in your browser to find: 404 errors, JavaScript errors, JavaScript warnings.
  • Start with pages:
    • MediaWiki:Common.js
    • MediaWiki:Common.css
    • MediaWiki:Vector.js
    • MediaWiki:Vector.css
    • MediaWiki:Monobook.js
    • MediaWiki:Monobook.css
    • Look for other JS and CSS pages via "Special:PrefixIndex/MediaWiki:".
  • Scan each page for patterns mentioned in the Migration guide or the Legacy JavaScript page.
    Always use a descriptive edit summary that explains why you are removing or changing code. A minimal summary may be "Maintenance: [[mw:RL/MGU]]".
    • Remove redundant and unused code. For example:
      • Redundant .wikitable styles.
      • Obsolete mainpage tab override.
      • Loading of local JS pages that don't exist on this wiki.
      • Conditional code for pages that can't or don't exist on this wiki.
      • Ensure module dependencies are declared.
    • Fix the deprecated code, or look for a compatible Snippet.