Page MenuHomePhabricator

Check environment and display new results every time when ?page=Welcome is accessed
Closed, ResolvedPublic

Description

When I was installing MediaWiki and reached mw-config/index.php?page=Welcome, it complained "No DB module". I went to install php5-mysql, then came back and reloaded the page. However the big red error box was still there. I tried several ways to restart the installation, including going to index.php, mw-config/index.php and clearing session cookies of the installer. No method except for the last worked but the last is really unfriendly. A newbie can be even misguided that the php-db environment is not correctly configured.


Version: 1.20.x
Severity: major

Details

Reference
bz31533

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:58 PM
bzimport set Reference to bz31533.
bzimport added a subscriber: Unknown Object (MLST).
liangent created this task.Oct 8 2011, 5:13 PM

In my second attempt to reproduce the bug, I found "Restart installation" on the right. I don't know why I didn't find it at the first time but an auto-retry or a big [Retry] button which attracts more attention can be added.

YenTheFirst wrote:

I can very much confirm this bug - I just spent a few hours digging through the installer to figure out why it couldn't find my MySql driver.

*** Bug 35125 has been marked as a duplicate of this bug. ***

This is a blocker to a 1.19 release. I've tweaked some of the bug settings accordingly. Also CC'ing Reedy.

demon added a comment.Mar 11 2012, 3:11 AM

(In reply to comment #4)

This is a blocker to a 1.19 release. I've tweaked some of the bug settings
accordingly. Also CC'ing Reedy.

Why wasn't this a blocker to 1.17 or 1.18? It's not a regression.

(In reply to comment #5)

(In reply to comment #4)

This is a blocker to a 1.19 release. I've tweaked some of the bug settings
accordingly. Also CC'ing Reedy.

Why wasn't this a blocker to 1.17 or 1.18? It's not a regression.

What's not a regression? It's honestly been a long time since I went through the MediaWiki installer, but you're saying that this has been the way it is for multiple versions?

There are users spending hours frustrated at a cached result. What's the virtue of caching the errors like this? And why do you think it's acceptable to release another version of MediaWiki with this issue? Compounded frustration is dangerous, especially in the installation phase. It's a quick way to get people to walk away from using MediaWiki altogether, isn't it?

Alternately, do you feel there's not an issue here and that people should just find "Restart installation" on their own? From the bug reports, it seems like there's definitely a bug here.

Reedy added a comment.Mar 11 2012, 9:36 PM

// cache initially available databases to make sure that everything will be displayed correctly

		// after a refresh on env checks page
		$databases = $this->getVar( '_CompiledDBs-preFilter' );
		if ( !$databases ) {
			$databases = $this->getVar( '_CompiledDBs' );
			$this->setVar( '_CompiledDBs-preFilter', $databases );
		}

		$databases = array_flip ( $databases );
		foreach ( array_keys( $databases ) as $db ) {
			$installer = $this->getDBInstaller( $db );
			$status = $installer->checkPrerequisites();
			if ( !$status->isGood() ) {
				$this->showStatusMessage( $status );
			}
			if ( !$status->isOK() ) {
				unset( $databases[$db] );
			}
		}
		$databases = array_flip( $databases );
		if ( !$databases ) {
			$this->showError( 'config-no-db', $wgLang->commaList( $allNames ) );
			// @todo FIXME: This only works for the web installer!
			return false;
		}
		$this->setVar( '_CompiledDBs', $databases );

If we have already a cached list of dbs, but this count is still 0, attempt to load it again. If still nill, we could give up...

Related URL: https://gerrit.wikimedia.org/r/65427 (Gerrit Change I2e7e5b4f72e7c11706d491a205e202008e2511da)

Change 65427 merged by MarkAHershberger:
Installer: page refresh should refresh list of supported DBs

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

Change 76642 had a related patch set uploaded by MarkAHershberger:
Installer: page refresh should refresh list of supported DBs

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

Change 76642 merged by MarkAHershberger:
Installer: page refresh should refresh list of supported DBs

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