filbertkm / WikibaseImport

Import entities from another Wikibase instance (e.g. Wikidata)
GNU General Public License v2.0
28 stars 18 forks source link

Loading with wfLoadExtension in LocalSettings.php causes importEntities to Error #32

Closed tarrow closed 6 years ago

tarrow commented 6 years ago

As title. If loaded with wfLoadExtension rather than require_once $IP/extensions/WikibaseImport/WikibaseImport.php"; it errors with:

[17a6178d6afddae2dafe179f] [no req]   Error from line 47 of /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php: Class 'Wikibase\Import\LoggerFactory' not found
Backtrace:
#0 /var/www/html/maintenance/doMaintenance.php(92): Wikibase\Import\Maintenance\ImportEntities->execute()
#1 /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php(133): require_once(string)
#2 {main}
addshore commented 6 years ago

It looks like that is because the autoloading is still done from composer via the php entry point.

https://github.com/filbertkm/WikibaseImport/blob/master/WikibaseImport.php#L5

lucaswerkmeister commented 6 years ago

I guess the extension.json needs to set load_composer_autoloader? I’ll send a PR.