Page MenuHomePhabricator

Warning "Invalid parameter for message: flow-rev-message-hid-post" from Flow\Formatter
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W9tTzwpAMFoAAI4XvdIAAAAH

message
channel: Bug58676
level: WARNING

Invalid parameter for message "flow-rev-message-hid-post": a:1:{s:9:"plaintext";N;}
trace
#3 /srv/mediawiki/php-1.33.0-wmf.2/extensions/Flow/includes/Formatter/AbstractFormatter.php(293): Message->parse()
#4 /srv/mediawiki/php-1.33.0-wmf.2/extensions/Flow/includes/Formatter/ChangesListFormatter.php(47): Flow\Formatter\AbstractFormatter->r(array, OldChangesList)
#5 /srv/mediawiki/php-1.33.0-wmf.2/extensions/Flow/Hooks.php(445): Flow\Formatter\ChangesListFormatter->format(Flow\Formatter\RecentChangesRow, OldChangesList, boolean)
#6 /srv/mediawiki/php-1.33.0-wmf.2/extensions/Flow/Hooks.php(399): FlowHooks::processRecentChangesLine(OldChangesList, string, RecentChange, array)
#7 /srv/mediawiki/php-1.33.0-wmf.2/includes/Hooks.php(174): FlowHooks::onOldChangesListRecentChangesLine(OldChangesList, string, RecentChange, array, array)
#8 /srv/mediawiki/php-1.33.0-wmf.2/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#9 /srv/mediawiki/php-1.33.0-wmf.2/includes/changes/OldChangesList.php(59): Hooks::run(string, array)
#10 /srv/mediawiki/php-1.33.0-wmf.2/includes/specials/SpecialRecentchanges.php(428): OldChangesList->recentChangesLine(RecentChange, boolean, integer)
#11 /srv/mediawiki/php-1.33.0-wmf.2/includes/specialpage/ChangesListSpecialPage.php(1561): SpecialRecentChanges->outputChangesList(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#12 /srv/mediawiki/php-1.33.0-wmf.2/includes/specialpage/ChangesListSpecialPage.php(671): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#13 /srv/mediawiki/php-1.33.0-wmf.2/includes/specials/SpecialRecentchanges.php(167): ChangesListSpecialPage->execute(NULL)
#14 /srv/mediawiki/php-1.33.0-wmf.2/includes/specialpage/SpecialPage.php(569): SpecialRecentChanges->execute(NULL)
#15 /srv/mediawiki/php-1.33.0-wmf.2/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)
#16 /srv/mediawiki/php-1.33.0-wmf.2/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#17 /srv/mediawiki/php-1.33.0-wmf.2/includes/MediaWiki.php(862): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.33.0-wmf.2/includes/MediaWiki.php(517): MediaWiki->main()
#19 /srv/mediawiki/php-1.33.0-wmf.2/index.php(42): MediaWiki->run()

Impact

Unknown.

Notes

Recorded in Logstash about 1,000 times in the last 30 days since at least 1.32-wmf.26. Has significant spikes on 2018-10-26 and on 2018-11-01 (today) on 1.33-wmf.2.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Fundamentally, the reason this error happens is because the Message class does two conflicting things:

  1. If you pass null to Message::plaintextParam(), Message::rawParam(), etc, you get a result like [ 'plaintext' => null ] or [ 'raw' => null ]
  2. Message::extractParam() uses isset( $param['plaintext'] ), isset( $param['raw'] ), etc. to check whether a parameter is plaintext/raw/etc; and isset() returns false if the key is present but set to null

This means that Message::plaintextParam( null ) returns something that is then not considered valid by Message::extractParam().

I'm going to patch Flow so that it (hopefully) will not try to pass null to Message::plaintextParam(), but this discrepancy in Message.php should probably be addressed.

Change 471171 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Flow@master] RevisionFormatter: Prevent null from being passed to Message::plaintextParam()

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

Change 471171 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] RevisionFormatter: Prevent null from being passed to Message::plaintextParam()

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM