Le Tour de Wikí is an adventurous journey through the wiki land of the Wikimedia Foundation. The tour started February 2011, following the Wikimedia deployment of MediaWiki 1.17 and ResourceLoader. In a nutshell, the tour checks all wikis for proper JavaScript and CSS functionality.

The tour was originally intended to be a recurring event in which one or more developers go through all public wikis. The first instance being named Wiki Tour 2011: Resource Walker (February 2011 – February 2012 ). However, after some years, I came to the realisation that even a single pass would take years to complete. As such, this page has transformed to becoming a more re-usable checklist and reference point for what to look for on an individual wiki.

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 mediawiki.org 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.

Checklist edit

You may want to use Tourbot, which can 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 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.

Tools edit