Page MenuHomePhabricator

Fatal Error in ApprovedRevs while running rebuildData.php
Closed, ResolvedPublic

Description

PHP Fatal error:  Call to undefined method WikiFilePage::getArticleID() in extensions/ApprovedRevs/ApprovedRevs.hooks.php on line 1079
PHP Stack trace:
PHP   1. {main}() extensions/Semanticmaintenance/rebuildData.php:0
PHP   2. require_once() extensions/Semanticmaintenance/rebuildData.php:174
PHP   3. SMW\Maintenance\RebuildData->execute() maintenance/doMaintenance.php:103
PHP   4. SMW\Maintenance\DataRebuilder->rebuild() extensions/Semanticmaintenance/rebuildData.php:141
PHP   5. SMW\Maintenance\DataRebuilder->doRebuildAll() extensions/Semanticsrc/Maintenance/DataRebuilder.php:147
PHP   6. SMW\SQLStore\ByIdDataRebuildDispatcher->dispatchRebuildFor() extensions/Semanticsrc/Maintenance/DataRebuilder.php:247
PHP   7. SMW\MediaWiki\Jobs\UpdateJob->run() extensions/Semanticsrc/SQLStore/ByIdDataRebuildDispatcher.php:171
PHP   8. SMW\MediaWiki\Jobs\UpdateJob->doUpdate() extensions/Semanticsrc/Jobs/UpdateJob.php:57
PHP   9. SMW\MediaWiki\Jobs\UpdateJob->doPrepareForUpdate() extensions/Semanticsrc/Jobs/UpdateJob.php:88
PHP  10. SMW\MediaWiki\Jobs\UpdateJob->needToParsePageContentBeforeUpdate() extensions/Semanticsrc/Jobs/UpdateJob.php:119
PHP  11. SMW\ContentParser->parse() extensions/Semanticsrc/Jobs/UpdateJob.php:136
PHP  12. SMW\ContentParser->fetchFromParser() extensions/Semanticincludes/ContentParser.php:147
PHP  13. Parser->parse() extensions/Semanticincludes/ContentParser.php:202
PHP  14. Parser->internalParse() includes/parser/Parser.php:434
PHP  15. Parser->replaceInternalLinks() includes/parser/Parser.php:1254
PHP  16. Parser->replaceInternalLinks2() includes/parser/Parser.php:1995
PHP  17. Hooks::run() includes/parser/Parser.php:2288
PHP  18. call_user_func_array:{includes/Hooks.php:209}() includes/Hooks.php:209
PHP  19. ApprovedRevsHooks::modifyFileLinks() includes/Hooks.php:209

Event Timeline

What versions of MediaWiki and Approved Revs are you running?

Also, do you have any custom settings for Approved Revs, like changing the set of namespaces covered?

ApprovedRevs: 1.0.0 (65d37aa) 2015-12-05T18:44:25
MediaWiki: 1.25.1 (42fb6d8)

Settings:

# ApprovedRevs group
$wgGroupPermissions['*']['viewlinktolatest']                  = false;
$wgGroupPermissions['user']['viewlinktolatest']               = false;
$wgGroupPermissions['approver']['viewlinktolatest']           = true;
$wgGroupPermissions['sysop']['viewlinktolatest']              = true;

$egApprovedRevsNamespaces = [ NS_PROJECT, NS_STORIES, NS_HELP ];
// Approved Revs configuration
$egApprovedRevsPermissions = [
	'All Pages' => ['group' => 'sysop'],
	'Namespace Permissions' => [
		NS_PROJECT => ['group' => 'approver'],
		NS_STORIES => ['group' => 'approver'],
		NS_HELP    => ['group' => 'approver'],
		NS_MANUAL  => ['group' => 'approver'],
	],
	'Category Permissions' => [],
	'Page Permissions' => []
];

//"No revision has been approved..."
$egApprovedRevsBlankIfUnapproved = true;
//"This is the lates version of the page it has no approved version."
$egApprovedRevsShowNotApprovedMessage = false;
$egApprovedRevsHistoryHeader = true;
$egApprovedRevsShowApproveLatest = true;

Just noticed that this is in James' fork of AR.

I'll try to ping him on it