Wikimedia

Workflow in MediaWiki installer is confusing if an error occurs when upgrading via web installer

[It is recommended you have completed at least 1 mediawiki coding task before attempting this task. The instructions are slightly more vauge then some other coding tasks, requiring you to figure more stuff out on your own. This task assumes you are familiar with PHP and have previously setup MediaWiki!]

Right now, if an error is encountered during a DB upgrade using web installer (not cli update.php) you get the message from the previous step "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.33.0-alpha, click Continue. "

This is confusing. You should get an error message using the red x errorbox (not the lightbulb message box).

This is because the if clause checking if $result is true has no else clause in includes/installer/WebInstaller.php (around line 65).

Your task is to add a new message string that is displayed in the event of an error during the upgrade process. See the phab ticket for more details.

The general steps you should follow:

  • (if you haven't already) download and setup a local development copy of mediawiki
  • Reproduce the issue so you know what the current situation is, and so you can compare your fix with the previous version
  • Add the new code to includes/installer/WebInstaller.php and add any new message to includes/installer/i18n/en.json & includes/installer/i18n/qqq.json (Other languages are handled by a separate process; don't add any other translations)
  • Test to make sure it works like it should
  • Submit your patch to gerrit

Task tags

  • mediawiki
  • php
  • error handling

Students who completed this task

LukasA

Task type

  • code Code
close

2018