Jump to content

Topic on Extension talk:Contribution Scores/Archive 2

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"