Page MenuHomePhabricator

Make the core page/html endpoint return system message content when appropriate
Closed, ResolvedPublic

Description

The behavior for loading HTML for pages in the MediaWiki namespace should match the behavior of ViewAction/Article.

When trying to load the content of a page in the MediaWiki namespace, and that page doesn't exist, the page/html REST endpoint should look up the system messagwe with the corresponding name and return its value instead. The subopage syntax can be used to reference the message in different languages.

For reference:

  • In requests to index.php, HTML display of messages is handled by Article::showMissingArticle
  • When editing, the raw text of the message is loaded into the editor by EditPage::getContentObject

Event Timeline

daniel triaged this task as Medium priority.Sep 5 2022, 9:22 AM
daniel created this task.

Change 850100 had a related patch set uploaded (by Daniel Kinzler; author: Derick Alangi):

[mediawiki/core@master] PageHTMLHandler: Allow use of system messages in page/html endpoint

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

Change 856549 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/core@master] Rest: Allow fetching content of pages with system messages

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

Change 850100 abandoned by D3r1ck01:

[mediawiki/core@master] PageHTMLHandler: Allow use of system messages in page/html endpoint

Reason:

I'm making another attempt but a different approach.

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

Change 856549 merged by jenkins-bot:

[mediawiki/core@master] Rest: Allow fetching content of pages with system messages

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

I see this had a patch merged. Is there more to do on this task?

daniel claimed this task.