Page MenuHomePhabricator

[GlobalPreferences] install fails with MultiConfig::get: undefined option: 'GlobalPreferencesDB'
Closed, ResolvedPublic5 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.

Details

Related Gerrit Patches:
integration/config : masterMigrate GlobalPreferences to Quibble
mediawiki/extensions/GlobalPreferences : masterFix installer

Event Timeline

hashar created this task.Jun 27 2018, 2:04 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptJun 27 2018, 2:04 PM
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

hashar claimed this task.Jul 20 2018, 3:46 PM

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

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

hashar closed this task as Resolved.Jul 21 2018, 9:13 PM
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