Page MenuHomePhabricator

Exception from "PermissionManager.php": PermissionManager::overrideUserRightsForTesting can not be called outside of tests
Open, Needs TriagePublic

Description

Setup

  • MediaWiki | 1.34.0-rc.1 (ccb2bb2)19:12, 18 November 2019
  • PHP | 7.2.24-0ubuntu0.18.04.1 (apache2handler)
  • MariaDB | 10.1.41-MariaDB-0ubuntu0.18.04.1
  • Semantic MediaWiki | 3.2.0-alpha (aef1b47) 18:20, 18 November 2019
  • Semantic Result Formats | 3.2.0-alpha (bcef869) 17:02, 11 November 2019
  • GraphViz | 3.0.0 (7099bd9) 09:42, 7 November 2019

Issue

Exception from line 1614 of /../w/includes/Permissions/PermissionManager.php: MediaWiki\Permissions\PermissionManager::overrideUserRightsForTesting can not be called outside of tests

Backtrace

#0 /../w/includes/user/User.php(263): MediaWiki\Permissions\PermissionManager->overrideUserRightsForTesting(Object(User), Array)
#1 /../w/extensions/GraphViz/includes/GraphViz.php(466): User->__set('mRights', Array)
#2 /../w/extensions/GraphViz/includes/GraphViz.php(641): MediaWiki\Extension\GraphViz\GraphViz::getUser()
#3 /../w/extensions/GraphViz/includes/GraphViz.php(444): MediaWiki\Extension\GraphViz\GraphViz::render('digraph QueryRe...', Array, Object(Parser), Object(PPFrame_Hash))
#4 /../w/includes/parser/Parser.php(4293): MediaWiki\Extension\GraphViz\GraphViz::graphvizParserHook('digraph QueryRe...', Array, Object(Parser), Object(PPFrame_Hash))
#5 /../w/includes/parser/PPFrame_Hash.php(328): Parser->extensionSubstitution(Array, Object(PPFrame_Hash))
#6 /../w/includes/parser/Parser.php(3330): PPFrame_Hash->expand(Object(PPNode_Hash_Tree), 0)
#7 /../w/includes/parser/Parser.php(1489): Parser->replaceVariables('<graphviz>digra...')
#8 /../w/includes/parser/Parser.php(800): Parser->internalParse('<graphviz>digra...', false, false)
#9 /../w/extensions/SemanticResultFormats/src/Graph/GraphPrinter.php(152): Parser->recursiveTagParse('<graphviz>digra...')
#10 /../w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(337): SRF\Graph\GraphPrinter->getResultText(Object(SMW\Query\QueryResult), 2)
#11 /../w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(302): SMW\Query\ResultPrinters\ResultPrinter->buildResult(Object(SMW\Query\QueryResult))
#12 /../w/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(348): SMW\Query\ResultPrinters\ResultPrinter->getResult(Object(SMW\Query\QueryResult), Array, 2)
#13 /../w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(364): SMWQueryProcessor::getResultFromQuery(Object(SMWQuery), Array, 2, 1001)
#14 /../w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(197): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(Array, Array)
#15 /../w/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(402): SMW\ParserFunctions\AskParserFunction->parse(Array)
#16 /../w/includes/parser/Parser.php(3816): SMW\ParserFunctionFactory->SMW\{closure}(Object(Parser), '[[Process::Mise...', '?has Successor=', 'format=graph', 'nodeshape=recta...', 'graphsize=20,20', 'graphcolor=yes', 'graphlink=yes', 'graphlabel=yes', 'graphlegend=yes', 'arrowdirection=...')
#17 /../w/includes/parser/Parser.php(3519): Parser->callParserFunction(Object(PPFrame_Hash), 'ask', Array)
#18 /../w/includes/parser/PPFrame_Hash.php(254): Parser->braceSubstitution(Array, Object(PPFrame_Hash))
#19 /../w/includes/parser/Parser.php(3330): PPFrame_Hash->expand(Object(PPNode_Hash_Tree), 0)
#20 /../w/includes/parser/Parser.php(1489): Parser->replaceVariables('{{#ask:\n [[Proc...')
#21 /../w/includes/parser/Parser.php(593): Parser->internalParse('{{#ask:\n [[Proc...')
#22 /../w/includes/content/WikitextContent.php(368): Parser->parse('{{#ask:\n [[Proc...', Object(Title), Object(ParserOptions), true, true, 8310)
#23 /../w/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Object(Title), 8310, Object(ParserOptions), true, Object(ParserOutput))
#24 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(186): AbstractContent->getParserOutput(Object(Title), 8310, Object(ParserOptions), true)
#25 /../w/extensions/SemanticMediaWiki/includes/ContentParser.php(145): SMW\ContentParser->fetchFromContent()
#26 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(197): SMW\ContentParser->parse()
#27 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#28 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#29 /../w/extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(237): SMW\MediaWiki\Jobs\UpdateJob->run()
#30 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(423): SMW\SQLStore\Rebuilder\Rebuilder->rebuild(939)
#31 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(349): SMW\Maintenance\DataRebuilder->do_update(939)
#32 /../w/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(200): SMW\Maintenance\DataRebuilder->rebuild_all()
#33 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(202): SMW\Maintenance\DataRebuilder->rebuild()
#34 /../w/maintenance/doMaintenance.php(99): SMW\Maintenance\RebuildData->execute()
#35 /../w/extensions/SemanticMediaWiki/maintenance/rebuildData.php(261): require_once('/var/www/html/s...')
#36 {main}

Event Timeline

Kghbln created this task.Nov 23 2019, 5:42 PM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptNov 23 2019, 5:42 PM
Kghbln updated the task description. (Show Details)Nov 23 2019, 5:42 PM
Kghbln updated the task description. (Show Details)Feb 23 2020, 12:12 PM

Was just about to file a bug for this!

Change 591107 had a related patch set uploaded (by markahershberger; owner: markahershberger):
[mediawiki/extensions/GraphViz@master] Stop directly modifying $user->mRights

https://gerrit.wikimedia.org/r/591107

Does this need to be updated with this comment from @Tgr?

Change 591107 merged by jenkins-bot:
[mediawiki/extensions/GraphViz@master] Stop directly modifying $user->mRights

https://gerrit.wikimedia.org/r/591107