SemanticMediaWiki / SemanticApprovedRevs

Complementary extension to Semantic MediaWiki and Approved Revs to control the storage of approved revision content
Other
4 stars 3 forks source link

MW 1.34+: SMW\ApprovedRevs\DatabaseLogReader::__construct() must be an instance of Wikimedia\Rdbms\Database #14

Closed kghbln closed 3 years ago

kghbln commented 5 years ago

Setup and configuration

Issue

When trying to run "rebuildElasticIndex.php" I get the following error:

TypeError from line 51 of /../w/extensions/SemanticApprovedRevs/src/DatabaseLogReader.php: Argument 1 passed to SMW\ApprovedRevs\DatabaseLogReader::__construct() must be an instance of Wikimedia\Rdbms\Database, instance of Wikimedia\Rdbms\MaintainableDBConnRef given, called in /../w/extensions/SemanticApprovedRevs/src/ServicesFactory.php on line 62

Backtrace

#0 /../w/extensions/SemanticApprovedRevs/src/ServicesFactory.php(62): SMW\ApprovedRevs\DatabaseLogReader->__construct(Wikimedia\Rdbms\MaintainableDBConnRef, NULL, string)
#1 /../w/extensions/SemanticApprovedRevs/src/ServicesFactory.php(71): SMW\ApprovedRevs\ServicesFactory->newDatabaseLogReader()
#2 /../w/extensions/SemanticApprovedRevs/src/PropertyAnnotator.php(81): SMW\ApprovedRevs\ServicesFactory->newApprovedByPropertyAnnotator()
#3 /../w/extensions/SemanticApprovedRevs/src/PropertyAnnotator.php(58): SMW\ApprovedRevs\PropertyAnnotator->initPropertyAnnotators()
#4 /../w/extensions/SemanticApprovedRevs/src/Hooks.php(224): SMW\ApprovedRevs\PropertyAnnotator->addAnnotation(SMW\SQLStore\EntityStore\StubSemanticData)
#5 /../w/includes/Hooks.php(174): SMW\ApprovedRevs\Hooks->onUpdateDataBefore(SMW\SQLStore\SQLStore, SMW\SQLStore\EntityStore\StubSemanticData)
#6 /../w/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#7 /../w/extensions/SemanticMediaWiki/src/Store.php(234): Hooks::run(string, array)
#8 /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/FileIndexer.php(409): SMW\Store->updateData(SMW\SQLStore\EntityStore\StubSemanticData)
#9 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Deferred/CallableUpdate.php(349): SMW\Elastic\Indexer\FileIndexer->SMW\Elastic\Indexer\{closure}()
#10 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Deferred/CallableUpdate.php(247): SMW\MediaWiki\Deferred\CallableUpdate->runUpdate()
#11 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Deferred/TransactionalCallableUpdate.php(168): SMW\MediaWiki\Deferred\CallableUpdate->doUpdate()
#12 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Deferred/CallableUpdate.php(285): SMW\MediaWiki\Deferred\TransactionalCallableUpdate->doUpdate()
#13 /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/FileIndexer.php(418): SMW\MediaWiki\Deferred\CallableUpdate->pushUpdate()
#14 /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/FileIndexer.php(305): SMW\Elastic\Indexer\FileIndexer->addAnnotation(SMW\SQLStore\SQLStore, SMW\DIWikiPage)
#15 /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/Rebuilder.php(292): SMW\Elastic\Indexer\FileIndexer->index(SMW\DIWikiPage, ForeignAPIFile)
#16 /../w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(378): SMW\Elastic\Indexer\Rebuilder->rebuild(string, SMW\SQLStore\EntityStore\StubSemanticData)
#17 /../w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(335): SMW\Maintenance\RebuildElasticIndex->rebuild_row(string, stdClass, string, boolean)
#18 /../w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(163): SMW\Maintenance\RebuildElasticIndex->rebuild()
#19 /../w/maintenance/doMaintenance.php(99): SMW\Maintenance\RebuildElasticIndex->execute()
#20 /../w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(437): require_once(string)
#21 {main}