Page MenuHomePhabricator

When upgrading via the web installer, in the event of a query error, form displays previous step.
Closed, ResolvedPublic

Description

[Semi split from T209285]

In includes/installer/WebInstallerUpgrade.php execute() (around line 65) if $installer->doUpgrade() returns false (e.g. It encountered a db query error), the execution just falls through and shows the dialog from the previous step.

Instead there should be an else statement for when $result is false, that calls $this->parent->getErrorBox() which advises the user of something along the lines of that an error occurred, the box above has more details and they can press continue to try again.

This message shown to the user should of course be i18n-ized and be added to includes/installer/i18n/en.json and includes/installer/i18n/qqq.json.

In order to test this behaviour, you will have to introduce an error into the install process. One easy way to do this is add something like $this->db->query( 'FADFSAd', __METHOD__ ); to includes/installer/MysqlUpdater.php, say at the beginning of checkBin() (line 392)

Related Objects

Event Timeline

Aklapper renamed this task from When upgrading via the web installer, in the event of a query error, form dislays previous step. to When upgrading via the web installer, in the event of a query error, form displays previous step..Nov 13 2018, 12:38 PM
Aklapper moved this task from Proposed tasks to Information needed on the Google-Code-in-2018 board.

Change 474474 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/core@master] Show an red error message for a database upgrade error

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

With the patch it'll look like this:

firefox_2018-11-17_17-49-36.png (517×1 px, 46 KB)

Change 474474 merged by jenkins-bot:
[mediawiki/core@master] Show an red error message for a database upgrade error

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