Page MenuHomePhabricator

[GlobalPreferences] install fails with MultiConfig::get: undefined option: 'GlobalPreferencesDB'
Closed, ResolvedPublic5 Estimated Story Points

Description

Installing the GlobalPreferences mediawiki extension with php maintenance/install.php --with-extensions causes:

Creating tables for enabled extensions
ConfigException from line 57 of /workspace/src/includes/config/MultiConfig.php: MultiConfig::get: undefined option: 'GlobalPreferencesDB'
Backtrace:
#0 /workspace/src/extensions/GlobalPreferences/includes/Hooks.php(225): MultiConfig->get(string)
#1 /workspace/src/includes/Hooks.php(174): GlobalPreferences\Hooks::onLoadExtensionSchemaUpdates(MysqlUpdater)
#2 /workspace/src/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#3 /workspace/src/includes/installer/DatabaseUpdater.php(127): Hooks::run(string, array)
#4 /workspace/src/includes/installer/DatabaseUpdater.php(192): DatabaseUpdater->__construct(Wikimedia\Rdbms\DatabaseMysqli, boolean, NULL)
#5 /workspace/src/includes/installer/DatabaseInstaller.php(312): DatabaseUpdater::newForDB(Wikimedia\Rdbms\DatabaseMysqli)
#6 /workspace/src/includes/installer/Installer.php(1552): DatabaseInstaller->createExtensionTables(MysqlInstaller)
#7 /workspace/src/includes/installer/CliInstaller.php(137): Installer->performInstallation(array, array)
#8 /workspace/src/maintenance/install.php(125): CliInstaller->execute()
#9 /workspace/src/maintenance/doMaintenance.php(94): CommandLineInstaller->execute()
#10 /workspace/src/maintenance/install.php(175): require_once(string)
#11 {main}

The GoogleLogin extension had a similar issue T196173 and ReadingLists still has it T196576.

The reason is the configuration objects are not available to the installer when it invokes the LoadExtensionSchemaUpdates hook.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kaldari set the point value for this task to 5.Jul 3 2018, 11:35 PM

Change 447085 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/extensions/GlobalPreferences@master] Fix installer

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

Change 447085 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Fix installer

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

hashar added a subscriber: MaxSem.

Merged by @MaxSem thanks!

Change 447216 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Migrate GlobalPreferences to Quibble

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

Change 447216 merged by jenkins-bot:
[integration/config@master] Migrate GlobalPreferences to Quibble

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

Change 652944 had a related patch set uploaded (by Umherirrender; owner: Hashar):
[mediawiki/extensions/GlobalPreferences@REL1_31] Fix installer

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

Change 652944 merged by Umherirrender:
[mediawiki/extensions/GlobalPreferences@REL1_31] Fix installer

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