When using the CLI installer and have it automatically load extensions, GeoData\Hooks::onLoadExtensionSchemaUpdates fails:
$ php maintenance/install.php --dbname geodata --dbpath /tmp/bla --dbtype sqlite --pass secret --with-extensions GeoDataWiki Wikiadmin Creating main page with default content done Creating tables for enabled extensions [0620ee5a8b1657d11548a3c8] [no req] MWException from line 38 of extensions/GeoData/includes/Hooks.php: Unrecognized backend '' Backtrace: #0 includes/Hooks.php(177): GeoData\Hooks::onLoadExtensionSchemaUpdates(SqliteUpdater) #1 includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL) #2 includes/installer/DatabaseUpdater.php(127): Hooks::run(string, array) #3 includes/installer/DatabaseUpdater.php(192): DatabaseUpdater->__construct(Wikimedia\Rdbms\DatabaseSqlite, boolean, NULL) #4 includes/installer/DatabaseInstaller.php(312): DatabaseUpdater::newForDB(Wikimedia\Rdbms\DatabaseSqlite) #5 includes/installer/Installer.php(1563): DatabaseInstaller->createExtensionTables(SqliteInstaller) #6 includes/installer/CliInstaller.php(138): Installer->performInstallation(array, array) #7 maintenance/install.php(125): CliInstaller->execute() #8 maintenance/doMaintenance.php(94): CommandLineInstaller->execute() #9 maintenance/install.php(175): require_once(string) #10 {main}
The extension hook:
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater ) { global $wgGeoDataBackend; if ( $wgGeoDataBackend != 'db' && $wgGeoDataBackend != 'elastic' ) { throw new MWException( "Unrecognized backend '$wgGeoDataBackend'" ); }
$wgGeoDataBackend has a default in extension.json:
{ "config": { "GeoDataBackend": { "value": "db" }, }
So I guess when LoadExtensionSchemaUpdates fires, the extension registry has not loaded the extension configuration settings.