Page MenuHomePhabricator

[SUPPORT] Errors on installing WikibaseQualityConstraints extension for Wikibase
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

  1. install mediawiki 1.34
  2. install wikibase 1.34
  3. follow this guide to install WikibaseQualityConstraints extension for Wikibase:

3a. Clone WikibaseQualityConstraints inside the extensions/ directory of your MediaWiki installations.
3b. install dependencies. run composer install inside the WikibaseQualityConsaraints directory.
3c. add "wfLoadExtension( 'WikibaseQualityConstraints' );" to LocalSettings.php
3d. Run php maintenance/update.php --quick.
3e. Run php maintenance/runScript.php extensions/WikibaseQualityConstraints/maintenance/ImportConstraintStatements.php.
all successful for me so far

  1. Data import (herein lies the bug): Run:
  2. in working directory should be the MediaWiki installation folder, i.e. where LocalSettings.php is

php extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php | tee -a LocalSettings.php

Expected Results:
import of Wikidata ConstraintEntities

Actual Result:
following error message:

<mydomainname>/test $ php extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php | tee -a LocalSettings.php
[90cf7068da880206e3502389] [no req] TypeError from line 48 of <mydomainname>/test/extensions/WikibaseQualityConstraints/src/WikibaseQualityConstraintsHooks.php: Argument 1 passed to WikibaseQuality\ConstraintReport\WikibaseQualityConstraintsHooks::onWikibaseChange() must be an instance of Wikibase\Lib\Changes\Change, instance of Wikibase\EntityChange given, called in <mydomainname>/test/includes/Hooks.php on line 174
Backtrace:
#0 <mydomainname>/test/includes/Hooks.php(174): WikibaseQuality\ConstraintReport\WikibaseQualityConstraintsHooks::onWikibaseChange(Wikibase\EntityChange)
#1 <mydomainname>/test/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#2 <mydomainname>/test/extensions/Wikibase/repo/includes/Notifications/HookChangeTransmitter.php(37): Hooks::run(string, array)
#3 <mydomainname>/test/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php(249): Wikibase\Repo\Notifications\HookChangeTransmitter->transmitChange(Wikibase\EntityChange)
#4 <mydomainname>/test/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php(157): Wikibase\Repo\Notifications\ChangeNotifier->transmitChange(Wikibase\EntityChange)
#5 <mydomainname>/test/extensions/Wikibase/repo/RepoHooks.php(247): Wikibase\Repo\Notifications\ChangeNotifier->notifyOnPageCreated(Revision)
#6 <mydomainname>/test/includes/Hooks.php(174): Wikibase\RepoHooks::onNewRevisionFromEditComplete(WikiPage, Revision, boolean, User, array)
#7 <mydomainname>/test/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#8 <mydomainname>/test/includes/Storage/PageUpdater.php(1134): Hooks::run(string, array)
#9 <mydomainname>/test/includes/Storage/PageUpdater.php(758): MediaWiki\Storage\PageUpdater->doCreate(CommentStoreComment, User, integer)
#10 <mydomainname>/test/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(400): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#11 <mydomainname>/test/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(260): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntityContent(Wikibase\PropertyContent, User, string, integer, boolean, array)
#12 <mydomainname>/test/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php(85): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntity(Wikibase\DataModel\Entity\Property, string, User, integer, boolean, array)
#13 <mydomainname>/test/extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php(171): Wikibase\Lib\Store\TypeDispatchingEntityStore->saveEntity(Wikibase\DataModel\Entity\Property, string, User, integer)
#14 <mydomainname>/test/extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php(137): WikibaseQuality\ConstraintReport\Maintenance\ImportConstraintEntities->importEntityFromJson(string, string)
#15 <mydomainname>/test/extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php(96): WikibaseQuality\ConstraintReport\Maintenance\ImportConstraintEntities->importEntityFromWikidata(string)
#16 <mydomainname>/test/maintenance/doMaintenance.php(99): WikibaseQuality\ConstraintReport\Maintenance\ImportConstraintEntities->execute()
#17 <mydomainname>/test/extensions/WikibaseQualityConstraints/maintenance/ImportConstraintEntities.php(248): require_once(string)
#18 {main}
<mydomainname>/test $

Event Timeline

Are you running WikibaseQualityConstraints master with MediaWiki and Wikibase 1.34? That’s not supported – the versions have to match.

Addshore renamed this task from errors on installing WikibaseQualityConstraints extension for Wikibase to [SUPPORT] Errors on installing WikibaseQualityConstraints extension for Wikibase .Feb 19 2020, 8:01 AM
Addshore updated the task description. (Show Details)
Addshore added a project: Wikidata-Campsite.
Addshore moved this task from Incoming to Blocked / Waiting / External on the Wikidata-Campsite board.

hi, oh OK sorry i did not know about this. 2 follow up questions:

  1. What is the version of Wikibase and Wikimedia that WikibaseQualityConstraints is compatible with? I did not find a version on the description page of the extension.
  2. When is the expected date that WikibaseQualityConstraints will be updated to be compatible with Wikibase 1.34/? Is this known?

thanks for the help,
Rik

  1. What is the version of Wikibase and Wikimedia that WikibaseQualityConstraints is compatible with? I did not find a version on the description page of the extension.

The version of each of the branch is compatible with the same branch of WikibaseQualityConstraints.

  1. When is the expected date that WikibaseQualityConstraints will be updated to be compatible with Wikibase 1.34/? Is this known?

It already is. If you want to have the compatibility with Mediawiki 1.34 and Wikibase 1.34 you have to use the 1.34 branch of WikibaseQualityConstraints. You can get it in Gerrit and GitHub.

hi, i am confused: i followed the instructions in the install guides you mention ([[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikibaseQualityConstraints/+/REL1_34 | Gerrit ]]and GitHub). These instructions do not make mentions of a version number, so i guess i installed the master. COuld you advise on how to install the 1.34 version of WikibaseQualityConstraints?

That instructions are for using the master branches instead of a specific version. Try doing this:

cd .../extensions/WikibaseQualityConstraints/
git checkout REL1_34

That way you should move WikibaseQualityConstraints from the master branch to the REL1_34 branch.

Once you change the branch to the REL1_34 I don't know if it will automagically work or if you have to repeat the other steps of the installation instructions

brilliant it worked!! thanks so much, really appreciate the help.
Rik