Page MenuHomePhabricator

Error: Cannot modify readonly property MediaWiki\Category\CategoryViewer::$query
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.20
  • timestamp: 2026-03-17T07:44:00.960Z
  • labels.phpversion: 8.3.30
  • trace.id: 7d887fc5-6229-4cbf-8779-3dbf50cf9fdf
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Error: Cannot modify readonly property MediaWiki\Category\CategoryViewer::$query
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.20/includes/Category/CategoryViewer.php(104)
#0/srv/mediawiki/php-1.46.0-wmf.20/includes/Page/CategoryPage.php(93)MediaWiki\Category\CategoryViewer->__construct(MediaWiki\Page\WikiCategoryPage, MediaWiki\Context\RequestContext, array, array, array)
#1/srv/mediawiki/php-1.46.0-wmf.20/includes/Page/CategoryPage.php(53)MediaWiki\Page\CategoryPage->closeShowCategory()
#2/srv/mediawiki/php-1.46.0-wmf.20/includes/Actions/ViewAction.php(71)MediaWiki\Page\CategoryPage->view()
#3/srv/mediawiki/php-1.46.0-wmf.20/includes/Actions/ActionEntryPoint.php(739)MediaWiki\Actions\ViewAction->show()
#4/srv/mediawiki/php-1.46.0-wmf.20/includes/Actions/ActionEntryPoint.php(510)MediaWiki\Actions\ActionEntryPoint->performAction(MediaWiki\Page\CategoryPage, MediaWiki\Title\Title)
#5/srv/mediawiki/php-1.46.0-wmf.20/includes/Actions/ActionEntryPoint.php(144)MediaWiki\Actions\ActionEntryPoint->performRequest()
#6/srv/mediawiki/php-1.46.0-wmf.20/includes/MediaWikiEntryPoint.php(180)MediaWiki\Actions\ActionEntryPoint->execute()
#7/srv/mediawiki/php-1.46.0-wmf.20/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#8/srv/mediawiki/w/index.php(3)require(string)
#9{main}
Impact

All and any pages in the Category: namespace seem to throw an exception on testwiki - I went to https://test.wikipedia.org/w/index.php?title=Special:Categories and clicked a few links, all of them are broken.

Notes

Details

MediaWiki Version
1.46.0-wmf.20
Request URL
https://test.wikipedia.org/w/index.php?from=*&title=Category:*
Related Changes in Gerrit:

Event Timeline

Aklapper triaged this task as Unbreak Now! priority.

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1252119 / https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/c11ab29829509ca9869ab03efa777d5a2e7f0c08 ("Use PHP8 constructor property promotion and readonly properties") changed the method signature of CategoryViewer::__construct() by making some passed parameters read-only.

I assume that a simple revert would unblock the train?

Also CC'ing the patch reviewers to get an opinion (and ideally a fixing patch) whether to fully revert or to just make a smaller followup change for this train blocker.

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

[mediawiki/core@master] Remove misplaced readonly from CategoryViewer::$query

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

Change #1254142 merged by jenkins-bot:

[mediawiki/core@master] Remove misplaced readonly from CategoryViewer::$query

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

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

[mediawiki/core@wmf/1.46.0-wmf.20] Remove misplaced readonly from CategoryViewer::$query

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

Change #1254166 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.20] Remove misplaced readonly from CategoryViewer::$query

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

Mentioned in SAL (#wikimedia-operations) [2026-03-17T13:09:07Z] <aklapper@deploy2002> Started scap sync-world: Backport for [[gerrit:1254166|Remove misplaced readonly from CategoryViewer::$query (T420315)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-17T13:11:10Z] <aklapper@deploy2002> zabe, aklapper: Backport for [[gerrit:1254166|Remove misplaced readonly from CategoryViewer::$query (T420315)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-03-17T13:15:38Z] <aklapper@deploy2002> Finished scap sync-world: Backport for [[gerrit:1254166|Remove misplaced readonly from CategoryViewer::$query (T420315)]] (duration: 06m 31s)

Thank you everyone for the quick action and help!