WikibaseImport icon indicating copy to clipboard operation
WikibaseImport copied to clipboard

error Invalid callback Wikibase\Import\Hooks

Open thomas-topway-it opened this issue 5 years ago • 2 comments

hello, after installing the extension on mediawiki/wikibase 1.32 and running php maintenance/update.php we get the following error

MWException from line 164 of /var/www/html/mediawiki/includes/Hooks.php: Invalid callback Wikibase\Import\Hooks::onLoadExtensionSchemaUpdates in hooks for LoadExtensionSchemaUpdates

also, executing php maintenance/importEntities.php --all-properties

raises the error /importEntities.php: Class 'Wikibase\Import\LoggerFactory' not found (on the last commit)

thanks (Thomas)

thomas-topway-it avatar Dec 28 '19 21:12 thomas-topway-it

Did this resolve itself? I'm running the latest docker images https://github.com/wmde/wikibase-release-pipeline/commit/911cb277a5073ed7598051bb673c8b065e8c203e and I am seeing this error:

ubuntu@wikibase:~/git/wikibase-release-pipeline/example$ sudo docker exec -it example_wikibase_1 php /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php --all-properties --entity Q2882604
[7db99fa0cb22cb1d7a14affb] [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(107): Wikibase\Import\Maintenance\ImportEntities->execute()
#1 /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php(133): require_once(string)
#2 {main}

With WikibaseImport mounted as a volume: ./extensions/WikibaseImport/:/var/www/html/extensions/WikibaseImport

I haven't enough PHP to figure out what's happening. Will keep looking and update folks if I get out of this dead-end.

ross-spencer avatar Sep 08 '21 13:09 ross-spencer

As a newcomer to the platform I had to go back through the installation instructions again. From the environment I have docker-compose installed and running the Wikibase image I was able to run composer update from the extensions/WikidataImport folder and once I did that, the php update (sudo docker exec -it example_wikibase_1 php /var/www/html/maintenance/update.php) command and it looks like it all works as anticipated which is great. So, for me it was a case of this error manifesting itself because I didn't follow the steps properly. Perhaps if anyone else comes across this ticket this'll help.

ross-spencer avatar Sep 10 '21 15:09 ross-spencer