Page MenuHomePhabricator

Revision.php: $row must be a row object, an associative array, or a RevisionRecord
Closed, ResolvedPublic

Description

The following exception is thrown in production:

$row must be a row object, an associative array, or a RevisionRecord

with a stack trace:

#0 /srv/mediawiki/php-1.35.0-wmf.28/extensions/FlaggedRevs/backend/FlaggedRevs.php(624): Revision->__construct(NULL)
#1 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3709): FlaggedRevs::{closure}(Title, Parser)
#2 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3818): Parser->fetchCurrentRevisionOfTitle(Title)
#3 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3752): Parser->statelessFetchTemplate(Title, Parser)
#4 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3672): Parser->fetchTemplateAndTitle(Title)
#5 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3433): Parser->getTemplateDom(Title)
#6 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPFrame_Hash)
#7 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(3158): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#8 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(1504): Parser->replaceVariables(string)
#9 /srv/mediawiki/php-1.35.0-wmf.28/includes/parser/Parser.php(618): Parser->internalParse(string)
#10 /srv/mediawiki/php-1.35.0-wmf.28/includes/content/WikitextContent.php(368): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#11 /srv/mediawiki/php-1.35.0-wmf.28/includes/content/AbstractContent.php(565): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#12 /srv/mediawiki/php-1.35.0-wmf.28/extensions/FlaggedRevs/backend/FlaggedRevs.php(631): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#13 /srv/mediawiki/php-1.35.0-wmf.28/extensions/FlaggedRevs/frontend/FlaggablePageView.php(677): FlaggedRevs::parseStableRevision(FlaggedRevision, ParserOptions)
#14 /srv/mediawiki/php-1.35.0-wmf.28/extensions/FlaggedRevs/frontend/FlaggablePageView.php(396): FlaggablePageView->showOldReviewedVersion(FlaggedRevision, string, string)
#15 /srv/mediawiki/php-1.35.0-wmf.28/extensions/FlaggedRevs/frontend/FlaggedRevsUIHooks.php(228): FlaggablePageView->setPageContent(boolean, boolean)
#16 /srv/mediawiki/php-1.35.0-wmf.28/includes/Hooks.php(174): FlaggedRevsUIHooks::onArticleViewHeader(Article, boolean, boolean)
#17 /srv/mediawiki/php-1.35.0-wmf.28/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#18 /srv/mediawiki/php-1.35.0-wmf.28/includes/page/Article.php(695): Hooks::run(string, array)
#19 /srv/mediawiki/php-1.35.0-wmf.28/includes/actions/ViewAction.php(66): Article->view()
#20 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(519): ViewAction->show()
#21 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(305): MediaWiki->performAction(Article, Title)
#22 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(973): MediaWiki->performRequest()
#23 /srv/mediawiki/php-1.35.0-wmf.28/includes/MediaWiki.php(535): MediaWiki->main()
#24 /srv/mediawiki/php-1.35.0-wmf.28/index.php(47): MediaWiki->run()
#25 /srv/mediawiki/w/index.php(3): require(string)
#26 {main}

I think it's a fallout from the recent patches converting FlaggedRev to RevisionRecord.

Event Timeline

Pchelolo created this task.Apr 16 2020, 8:43 PM
Restricted Application added a project: User-DannyS712. · View Herald TranscriptApr 16 2020, 8:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 589420 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/FlaggedRevs@master] Don't try to create a Revision with null

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

Pchelolo triaged this task as High priority.Apr 16 2020, 8:44 PM
DannyS712 changed the subtype of this task from "Task" to "Production Error".

Change 589420 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Don't try to create a Revision with null

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

Change 589428 had a related patch set uploaded (by Jforrester; owner: DannyS712):
[mediawiki/extensions/FlaggedRevs@wmf/1.35.0-wmf.28] Don't try to create a Revision with null

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

https://logstash.wikimedia.org/goto/a2e4e3cea3b44024c4a82b37e0c5345f - 38 instances in an how - I guess that's serious enough to get backported? I am not sure what would the user-facing implications of this be though

Yes, will do now.

Change 589428 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@wmf/1.35.0-wmf.28] Don't try to create a Revision with null

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

Mentioned in SAL (#wikimedia-operations) [2020-04-16T21:59:49Z] <jforrester@deploy1001> Synchronized php-1.35.0-wmf.28/extensions/FlaggedRevs/: T250439 Don't try to create a Revision with null (duration: 01m 02s)

Jdforrester-WMF closed this task as Resolved.Apr 16 2020, 10:04 PM

Deployed, things look better. Thanks!