Page MenuHomePhabricator

REST HTML endpoint returning 500 for JSON page
Open, HighPublicBUG REPORT


Steps to replicate the issue (include links if applicable):

What happens?:

  • Get status 500

What should have happened instead?:


  • Note that the page in question uses the JSON content model.


  • reqId: befbc706-3204-43a7-8955-bc1804b69b8b
  • exception.message: Failed to find content language in page bundle data
from /srv/mediawiki/php-1.42.0-wmf.20/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(614)
#0 /srv/mediawiki/php-1.42.0-wmf.20/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(629): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->getHtmlOutputContentLanguage()
#1 /srv/mediawiki/php-1.42.0-wmf.20/includes/Rest/Handler/PageHTMLHandler.php(137): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->putHeaders(MediaWiki\Rest\Response, boolean)
#2 /srv/mediawiki/php-1.42.0-wmf.20/includes/Rest/SimpleHandler.php(40): MediaWiki\Rest\Handler\PageHTMLHandler->run(string)

Event Timeline

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


daniel triaged this task as High priority.Dec 19 2023, 4:03 PM

I can't reproduce this locally anymore. But it still happens in production. But now there is info in logstash. I'll update the task description.

Change 1008538 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] HtmlOutputRendererHelper: fall back to page language

Change 1008538 merged by jenkins-bot:

[mediawiki/core@master] HtmlOutputRendererHelper: fall back to page language