Extension talk:Contribution Scores

About this board

Archive


Error: Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39.

1
LoranIpsum (talkcontribs)

Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39. [Called from ContributionScores::getContributionScoreData in /home/jesussav/christur.com/w/extensions/ContributionScores/src/ContributionScores.php at line 93] in /home/jesussav/christur.com/w/includes/debug/MWDebug.php on line 379


From the following line of code:

$dbr = wfGetDB( DB_REPLICA );

Reply to "Error: Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39."
Summary by Fokebox

Resolved

Fokebox (talkcontribs)

Updated my wiki to 1.42.1 and there is a mistake at Scores Page:

Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39. [Called from ContributionScores::getContributionScoreData in /data/www/mywiki.ru/mediawiki-1.42.1/extensions/ContributionScores/src/ContributionScores.php at line 93] in /var/www/u1406315/data/www/mywiki.ru/mediawiki-1.42.1/includes/debug/MWDebug.php on line 379
Fokebox (talkcontribs)

As use of wfGetDB was deprecated changed the line 93 from:

$dbr = wfGetDB( DB_REPLICA );

to:

$dbr = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_REPLICA );

The problem has been resolved! Dear developers, please consider that in future updates of the extension.

Incompatible with mysql and sql_mode=only_full_group_by

1
181.117.11.70 (talkcontribs)

In my installation, showing Special:ContributionScores throws the following error:

Error 1055: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 's.page_count' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

As a temporary workaround I can use:

$wgSQLMode="";

in LocalSettings.php.

The problem can probably be fixed changing line 188:

'GROUP BY' => 'user_name',

to

'GROUP BY' => 'user_name, page_count, rev_count',

Reply to "Incompatible with mysql and sql_mode=only_full_group_by"

Page crash when using {{#cscore:USERNAME|pages}} in user page

3
Ryansbudza (talkcontribs)

Since upgrading to Mediawiki 1.39.1 [php 7.4.33] we get a error 500 page crash on pages with the magic word {{#cscore:USERNAME|pages}}.

I am using the latest ContributionScores from GitHub. Any ideas what is wrong?

[error] [Y-KFIOv3zEIk3CHvu7vgsQAAABE] /wiki/User:UUU   PHP Unknown error:  Cannot access non-public property Parser::$mStripState
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /XXX/w/includes/debug/DeprecationHelper.php(202): trigger_error(string, integer)
#2 /XXX/w/extensions/ContributionScores/src/ContributionScores.php(79): Parser->__get(string)
#3 /XXX/w/includes/parser/Parser.php(3443): ContributionScores::efContributionScoresRender(Parser, string, string)
#4 /XXX/w/includes/parser/Parser.php(3126): Parser->callParserFunction(PPFrame_Hash, string, array)
#5 /XXX/w/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPFrame_Hash)
#6 /XXX/w/includes/parser/Parser.php(2955): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#7 /XXX/w/includes/parser/Parser.php(1610): Parser->replaceVariables(string)
#8 /XXX/w/includes/parser/Parser.php(724): Parser->internalParse(string)
Ryansbudza (talkcontribs)

Solved. Change line 79 in \src\ContributionScores.php from

return $parser->insertStripItem( $output, $parser->mStripState );

to

return $parser->insertStripItem( $output, $parser->getStripState());
Egel (talkcontribs)
Reply to "Page crash when using {{#cscore:USERNAME|pages}} in user page"
Marx.FelipeForte (talkcontribs)

Is it possible to filter certain namespaces, so that it would only consider edits made in content namespaces?

Reply to "Filtering namespaces"

Configuration directive to only score edits from content namespaces?

3
Chrishel (talkcontribs)

For my wiki, we would like the contribution score to only measure edits to pages in content namespaces (i.e. defined in $wgContentNamespaces). If I created a patch to add this feature, would this be of enough broad interest to be merged into the master branch?

Marx.FelipeForte (talkcontribs)

Yes, I would appreciate a switch like that as well.

Tinss (talkcontribs)

I think it would be a very useful switch to have in LocalSettings.php.

Reply to "Configuration directive to only score edits from content namespaces?"

Score randomly changes on page refresh

1
82.218.159.50 (talkcontribs)

The score and ranking of the users on the special contribution-score site as well as on the widgets (using Special:ContributionScores) randomly changes on some page requests (sometimes on every page request).

There seems to be no logic behind the ranking. Sometimes it seems that the score of user A is assigned to User B. On the next page refresh it gets reversed.

Is this really how it's supposed to be?

Reply to "Score randomly changes on page refresh"

Filtering out specific usernames

4
Summary by Tinss

Implemented in git #725127.

Tinss (talkcontribs)

Is there a way to filter out specific users from the query? I'd very much like to have the extension on my wiki, but I'm the largest contributor by far so that would be somewhat demotivating to other users ;)

Chrishel (talkcontribs)

I've created a patch for this feature that is awaiting review.

Chrishel (talkcontribs)

This feature has been merged into the master branch. Use $wgContribScoreIgnoreUsernames (array of strings) with usernames to exclude from the reporting.

Tinss (talkcontribs)

Thank you very much! I was about to get to reviewing the patch.

1.35 download is broken

2
Summary by Kghbln

Installation instructions were amended.

Jobgh (talkcontribs)

I tried installing this extension through the download link, and got a whole bunch of installation issues. The issue turned out to be missing files and folders. I had no extension.json and no /src folder.


I cloned from the GitHub repo, and it installed perfectly. I'm not familiar with the extension pipeline.

Is anyone else getting this issue?

Kghbln (talkcontribs)

The installation instructions were incorrect. I adapted them to also cater for MediaWiki 1.35 and earlier. Moreover I had a go at the whole page and hopefully made it easier to read an grasp. Anyhow, thanks for the pointer.

Does not show any results

7
Usek2 (talkcontribs)

At the moment extension is used on nearly brand new Wiki with few articles.


Two articles have been created and edited with two different users however no score shows up.


Any ideas?

Camponez (talkcontribs)

I'm having the same problem with a brand new 1.33. After more than 100 edits, no scores at all.

Camponez (talkcontribs)
Camponez (talkcontribs)
Nick Parrott (talkcontribs)

Validated that the patched version camponez/mediawiki-extensions-ContributionScores is working fine on both 1.33 and 1.34


However, to download and install, you will need to git-clone via HTTPS, then unpack and relocate to your extension directory...

MusikAnimal (talkcontribs)
Timingliu (talkcontribs)

confrimed that the master branch is working, but you will have to download from the master branch, not the download extension link.

Reply to "Does not show any results"
Return to "Contribution Scores" page.