Extension talk:Contribution Scores
![]() Archives
| ||
---|---|---|
| ||
Error 1146: Table 'ipblocks' doesn't exist. Function: ContributionScores::getContributionScoreData
I have the latest ContributionScores extension installed (1.43) with the upgraded Mediawiki 1.43, and I receive an error on the ContributionScores page.
Error 1146: Table 'abc.def_ipblocks' doesn't exist. Function: ContributionScores::getContributionScoreData
I see in the src / ContributionScores.php file, it still refers to the ipblocks table which is missing in my 1.43 install.
if ( $wgContribScoreIgnoreBlockedUsers ) {
$sqlWhere[] = "{$revUser} NOT IN " .
$dbr->buildSelectSubquery( 'ipblocks', 'ipb_user', 'ipb_user <> 0', __METHOD__ );
}
The Manual:Ipblocks table page states "Starting from MediaWiki 1.42 this table will be replaced with the new block and block_target tables." Ryansbudza (talk) 10:32, 5 February 2025 (UTC)
- A quick workaround is to set:
- $wgContribScoreIgnoreBlockedUsers = false;
- in your LocalSettings.php Mattgoldspink (talk) 18:05, 25 February 2025 (UTC)
- I ran into the same problem: https://phabricator.wikimedia.org/T393341 Krabina (talk) 19:04, 4 May 2025 (UTC)
Error 42803: ERROR: column "u.user_id" must appear in the GROUP BY clause or be used in an aggregate function
Hi, have ContributionScores extension installed (1.39) with the upgraded Mediawiki 1.39 on postgressql, and I receive an error on the ContributionScores page.
Error 42803: ERROR: column "u.user_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...ContributionScores::getContributionScoreData */ user_id,us...
^
Function: ContributionScores::getContributionScoreData
Query: SELECT user_id,user_name,user_real_name,page_count,rev_count,page_count+SQRT(rev_count-page_count)*2 AS "wiki_rank" FROM "user" "u" JOIN ((SELECT actor_rev_user.actor_user AS "rev_user",COUNT(DISTINCT rev_page) AS "page_count",COUNT(rev_id) AS "rev_count" FROM "revision" JOIN "actor" "actor_rev_user" ON ((actor_rev_user.actor_id = rev_actor)) WHERE (rev_timestamp > '2025-03-05 09:18:42+00') AND (actor_rev_user.actor_user NOT IN (SELECT ipb_user FROM "ipblocks" WHERE ipb_user <> 0 )) AND (actor_rev_user.actor_user NOT IN (SELECT ug_user FROM "user_groups" WHERE ug_group = 'bot' AND (ug_expiry IS NULL OR ug_expiry >= '2025-03-10 09:18:42+00') )) GROUP BY rev_user ORDER BY page_count DESC LIMIT 50 ) UNION (SELECT actor_rev_user.actor_user AS "rev_user",COUNT(DISTINCT rev_page) AS "page_count",COUNT(rev_id) AS "rev_count" FROM "revision" JOIN "actor" "actor_rev_user" ON ((actor_rev_user.actor_id = rev_actor)) WHERE (rev_timestamp > '2025-03-05 09:18:42+00') AND (actor_rev_user.actor_user NOT IN (SELECT ipb_user FROM "ipblocks" WHERE ipb_user <> 0 )) AND (actor_rev_user.actor_user NOT IN (SELECT ug_user FROM "user_groups" WHERE ug_group = 'bot' AND (ug_expiry IS NULL OR ug_expiry >= '2025-03-10 09:18:42+00') )) GROUP BY rev_user ORDER BY rev_count DESC LIMIT 50 )) "s" ON ((user_id=rev_user)) GROUP BY user_name ORDER BY wiki_rank DESC LIMIT 50
Backtrace:
from /var/www/html/includes/libs/rdbms/database/Database.php(1618)
#0 /var/www/html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 /var/www/html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /var/www/html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 /var/www/html/includes/libs/rdbms/database/Database.php(1711): Wikimedia\Rdbms\Database->query()
#4 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->select()
#5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(326): Wikimedia\Rdbms\DBConnRef->__call()
#6 /var/www/html/extensions/ContributionScores/src/ContributionScores.php(193): Wikimedia\Rdbms\DBConnRef->select()
#7 /var/www/html/extensions/ContributionScores/src/ContributionScores.php(235): ContributionScores::getContributionScoreData()
#8 /var/www/html/includes/libs/objectcache/wancache/WANObjectCache.php(1689): ContributionScores->{closure}()
#9 /var/www/html/includes/libs/objectcache/wancache/WANObjectCache.php(1522): WANObjectCache->fetchOrRegenerate()
#10 /var/www/html/extensions/ContributionScores/src/ContributionScores.php(236): WANObjectCache->getWithSetCallback()
#11 /var/www/html/extensions/ContributionScores/src/ContributionScores.php(369): ContributionScores->genContributionScoreTable()
#12 /var/www/html/extensions/ContributionScores/src/ContributionScores.php(319): ContributionScores->showInclude()
#13 /var/www/html/includes/specialpage/SpecialPage.php(701): ContributionScores->execute()
#14 /var/www/html/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#15 /var/www/html/includes/specialpage/SpecialPageFactory.php(1490): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#16 /var/www/html/includes/parser/Parser.php(3219): MediaWiki\SpecialPage\SpecialPageFactory->capturePath()
#17 /var/www/html/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution()
#18 /var/www/html/includes/parser/Parser.php(2951): PPFrame_Hash->expand()
#19 /var/www/html/includes/parser/Parser.php(1609): Parser->replaceVariables()
#20 /var/www/html/includes/parser/Parser.php(723): Parser->internalParse()
#21 /var/www/html/includes/content/WikitextContentHandler.php(301): Parser->parse()
#22 /var/www/html/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#23 /var/www/html/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#24 /var/www/html/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#25 /var/www/html/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#26 /var/www/html/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#27 /var/www/html/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#28 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#29 /var/www/html/includes/Revision/RenderedRevision.php(199): call_user_func()
#30 /var/www/html/extensions/TemplateData/includes/Hooks.php(99): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#31 /var/www/html/includes/HookContainer/HookContainer.php(338): MediaWiki\Extension\TemplateData\Hooks::onMultiContentSave()
#32 /var/www/html/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#33 /var/www/html/includes/HookContainer/HookRunner.php(2613): MediaWiki\HookContainer\HookContainer->run()
#34 /var/www/html/includes/Storage/PageUpdater.php(901): MediaWiki\HookContainer\HookRunner->onMultiContentSave()
#35 /var/www/html/includes/EditPage.php(2596): MediaWiki\Storage\PageUpdater->saveRevision()
#36 /var/www/html/includes/EditPage.php(1904): EditPage->internalAttemptSave()
#37 /var/www/html/includes/EditPage.php(721): EditPage->attemptSave()
#38 /var/www/html/includes/actions/EditAction.php(73): EditPage->edit()
#39 /var/www/html/includes/actions/SubmitAction.php(38): EditAction->show()
#40 /var/www/html/includes/MediaWiki.php(542): SubmitAction->show()
#41 /var/www/html/includes/MediaWiki.php(322): MediaWiki->performAction()
#42 /var/www/html/includes/MediaWiki.php(904): MediaWiki->performRequest()
#43 /var/www/html/includes/MediaWiki.php(562): MediaWiki->main()
#44 /var/www/html/index.php(50): MediaWiki->run()
#45 /var/www/html/index.php(46): wfIndexMain()