Page MenuHomePhabricator

PHP Notice: Undefined index:
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.37.0-wmf.6

message
PHP Notice: Undefined index: 

from /srv/mediawiki/php-1.37.0-wmf.6/extensions/Cite/src/ReferenceStack.php(196)
#0 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Cite/src/ReferenceStack.php(196): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Cite/src/Cite.php(371): Cite\ReferenceStack->pushRef(Parser, StripState, string, array, string, string, NULL, NULL, NULL)
#2 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Cite/src/Cite.php(129): Cite\Cite->guardedRef(Parser, string, array)
#3 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Cite/src/Hooks/CiteParserTagHooks.php(41): Cite\Cite->ref(Parser, string, array)
#4 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3945): Cite\Hooks\CiteParserTagHooks::ref(string, array, Parser, PPFrame_Hash)
#5 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(341): Parser->extensionSubstitution(array, PPFrame_Hash)
#6 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPTemplateFrame_Hash.php(178): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#7 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPTemplateFrame_Hash.php(190): PPTemplateFrame_Hash->getNamedArgument(string)
#8 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3861): PPTemplateFrame_Hash->getArgument(string)
#9 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(280): Parser->argSubstitution(array, PPTemplateFrame_Hash)
#10 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/CoreParserFunctions.php(1126): PPFrame_Hash->expand(PPNode_Hash_Tree)
#11 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3382): CoreParserFunctions::tagObj(Parser, PPTemplateFrame_Hash, array)
#12 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3067): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#13 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#14 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3256): PPFrame_Hash->expand(PPNode_Hash_Tree)
#15 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
#16 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(2905): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#17 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(1575): Parser->replaceVariables(string)
#18 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(648): Parser->internalParse(string)
#19 /srv/mediawiki/php-1.37.0-wmf.6/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#20 /srv/mediawiki/php-1.37.0-wmf.6/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#21 /srv/mediawiki/php-1.37.0-wmf.6/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#22 /srv/mediawiki/php-1.37.0-wmf.6/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#23 /srv/mediawiki/php-1.37.0-wmf.6/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#24 /srv/mediawiki/php-1.37.0-wmf.6/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#25 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#26 /srv/mediawiki/php-1.37.0-wmf.6/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#27 /srv/mediawiki/php-1.37.0-wmf.6/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#28 /srv/mediawiki/php-1.37.0-wmf.6/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#29 /srv/mediawiki/php-1.37.0-wmf.6/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#30 /srv/mediawiki/php-1.37.0-wmf.6/includes/page/WikiPage.php(1340): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#31 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiParse.php(83): WikiPage->getParserOutput(ParserOptions, NULL, boolean)
#32 /srv/mediawiki/php-1.37.0-wmf.6/includes/poolcounter/PoolCounterWorkViaCallback.php(74): ApiParse::{closure}()
#33 /srv/mediawiki/php-1.37.0-wmf.6/includes/poolcounter/PoolCounterWork.php(162): PoolCounterWorkViaCallback->doWork()
#34 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiParse.php(90): PoolCounterWork->execute()
#35 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiParse.php(694): ApiParse->getPageParserOutput(WikiPage, NULL, ParserOptions, boolean)
#36 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiParse.php(218): ApiParse->getParsedContent(WikiPage, ParserOptions, boolean, NULL, NULL, boolean)
#37 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(1669): ApiParse->execute()
#38 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(608): ApiMain->executeAction()
#39 /srv/mediawiki/php-1.37.0-wmf.6/extensions/TextExtracts/includes/ApiQueryExtracts.php(280): ApiMain->execute()
#40 /srv/mediawiki/php-1.37.0-wmf.6/extensions/TextExtracts/includes/ApiQueryExtracts.php(181): TextExtracts\ApiQueryExtracts->parse(WikiPage)
#41 /srv/mediawiki/php-1.37.0-wmf.6/extensions/TextExtracts/includes/ApiQueryExtracts.php(118): TextExtracts\ApiQueryExtracts->getExtract(Title)
#42 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiQuery.php(327): TextExtracts\ApiQueryExtracts->execute()
#43 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(1669): ApiQuery->execute()
#44 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(639): ApiMain->executeAction()
#45 /srv/mediawiki/php-1.37.0-wmf.6/includes/api/ApiMain.php(610): ApiMain->executeActionWithErrorHandling()
#46 /srv/mediawiki/php-1.37.0-wmf.6/api.php(90): ApiMain->execute()
#47 /srv/mediawiki/php-1.37.0-wmf.6/api.php(45): wfApiMain()
#48 /srv/mediawiki/w/api.php(3): require(string)
#49 {main}

Impact

Notes

Details

Request URL
https://ja.wikipedia.org/w/api.php?action=query&format=json&prop=extracts%7Crevisions&iwurl=1&utf8=1&formatversion=2&exlimit=1&explaintext=1&rvprop=ids&redirects=1&converttitles=1&titles=<title>

Event Timeline

Krinkle added a subscriber: Krinkle.

Cite has a steward. Editing for frontend, Parsoid team for backend.

(Please only tag "Logspam" when triaging untriaged tasks on this workboard to other columns, using it as substitute for a team. See project description for details.)

Krinkle triaged this task as High priority.May 26 2021, 8:19 PM
Krinkle moved this task from Untriaged to May 2021 on the Wikimedia-production-error board.

@thcipriani asked me to add logspam as TextExtracts is currently under code stewardship review and my team who are listed as maintainers are unable to work on this if needed. Hopefully the issue proves to be completely inside the Cite extension.

Code in the backtrace was created as part of WMDE Book referencing project; I'm adding folks who worked on it, in case you're able to investigate.

Change 697414 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] More robust property initialization in ReferenceStack

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

For the record, this seems to have been a very rare issue. Searching Logstash for "ReferenceStack" AND "undefined index" yields: https://logstash.wikimedia.org/goto/5c3f48e13ed59f48e9a1e692946d0f74

image.png (525×2 px, 69 KB)

Change 697414 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] More robust property initialization in ReferenceStack

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

matmarex assigned this task to thiemowmde.

Thank you for taking care of it!