Page MenuHomePhabricator

TypeError: MediaWiki\Api\ApiFeedContributions::feedItem(): Argument #1 ($row) must be of type stdClass, Flow\Formatter\ContributionsRow given, called in /srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiFeedContributions.php on l
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.45.0-wmf.9
  • timestamp: 2025-07-08T09:23:47.315Z
  • phpversion: 8.1.32
  • reqId: 69001a60-8c24-4155-9aae-ea9a65476ac3
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   TypeError: MediaWiki\Api\ApiFeedContributions::feedItem(): Argument #1 ($row) must be of type stdClass, Flow\Formatter\ContributionsRow given, called in /srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiFeedContributions.php on l
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiFeedContributions.php(189)
#0/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiFeedContributions.php(179)MediaWiki\Api\ApiFeedContributions->feedItem(Flow\Formatter\ContributionsRow)
#1/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiMain.php(2016)MediaWiki\Api\ApiFeedContributions->execute()
#2/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiMain.php(954)MediaWiki\Api\ApiMain->executeAction()
#3/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiMain.php(925)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#4/srv/mediawiki/php-1.45.0-wmf.9/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#5/srv/mediawiki/php-1.45.0-wmf.9/includes/MediaWikiEntryPoint.php(198)MediaWiki\Api\ApiEntryPoint->execute()
#6/srv/mediawiki/php-1.45.0-wmf.9/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#7/srv/mediawiki/w/api.php(3)require(string)
#8{main}
Impact

Moderate as we've only deployed wmf9 to group0 so far, but I am worried about group1 thus setting as train blocker. (Feel free to correct me.)

Notes

Event Timeline

Aklapper triaged this task as Unbreak Now! priority.

Also CC'ing reviewers of the original patch as this will block the train tomorrow from proceeding

Maybe Flow's FormatterRow could extend stdClass given that ApiFeedContributionsfeedItemHook::onApiFeedContributionsfeedItem already is documented with stdClass and this typically what a "data row" means in MW. ContribsPager__reallyDoQueryHook is still vaguely documented about &$data just being some array, it should also use stdClass if ApiFeedContribution::feedItem is requiring stdClass .

The quick-n-dirty fix is just removing that type hint in feedItem() for now.

Change #1167271 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/Flow@master] Make FormatterRow extend stdClass

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

The quick-n-dirty fix is just removing that type hint in feedItem() for now.

This seems reasonable for now, just to get the train moving again. Can always add the type hint back later.

Change #1167279 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] Remove stdClass type hint from ApiFeedContributions::feedItem() for now

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

Change #1167279 merged by jenkins-bot:

[mediawiki/core@master] Remove stdClass type hint from ApiFeedContributions::feedItem() for now

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

Change #1167296 had a related patch set uploaded (by Zabe; author: Aaron Schulz):

[mediawiki/core@wmf/1.45.0-wmf.9] Remove stdClass type hint from ApiFeedContributions::feedItem() for now

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

Change #1167296 merged by jenkins-bot:

[mediawiki/core@wmf/1.45.0-wmf.9] Remove stdClass type hint from ApiFeedContributions::feedItem() for now

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

Mentioned in SAL (#wikimedia-operations) [2025-07-08T22:09:36Z] <zabe@deploy1003> Started scap sync-world: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]]

Mentioned in SAL (#wikimedia-operations) [2025-07-08T22:12:11Z] <zabe@deploy1003> zabe: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-07-08T22:18:10Z] <zabe@deploy1003> Finished scap sync-world: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]] (duration: 08m 33s)

Mentioned in SAL (#wikimedia-operations) [2025-07-09T08:01:31Z] <aklapper@deploy1003> Started scap sync-world: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]]

Mentioned in SAL (#wikimedia-operations) [2025-07-09T08:03:57Z] <aklapper@deploy1003> zabe, aklapper: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-07-09T08:09:53Z] <aklapper@deploy1003> Finished scap sync-world: Backport for [[gerrit:1167296|Remove stdClass type hint from ApiFeedContributions::feedItem() for now (T398925)]] (duration: 08m 21s)

Change #1167271 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/Flow@master] Make FormatterRow extend stdClass

Reason:

No longer needed

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