Page MenuHomePhabricator

Extension:FlaggedRevs can't control which revision is used on API action=parse calls.
Open, Needs TriagePublicFeature

Description

If an extension like Extension:FlaggedRevs is used, it should ideally be able to consistently force stable revisions everywhere, but the action=parse API currently doesn't respect extensions like this.

Steps to Reproduce:

  • Install a wiki with Extension:FlaggedRevs installed
  • Edit a page but keep it unreviewed
  • Do an API call via action=parse (/api.php?action=parse&page=<Title>&prop=text&wrapoutputclass=)

Actual Results:
The unreviewed most recent version of the page is used for parsing.

Expected Results:
The stable version as defined by Extension:FlaggedRevs should be used for parsing.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 12 2019, 12:32 PM

Removing MediaWiki-General as it's not the task of MediaWiki core itself to check for the existence of all potential extensions and adjust default core behavior. It would be up to FlaggedRevs to provide additional API that fulfills this wish.

Aklapper changed the subtype of this task from "Bug Report" to "Feature Request".Mar 12 2019, 2:16 PM

The reason why I added Core is that there is no way to hook into this behaviour for all I could see in the relevant file, but I trust you to know what kind of tags are relevant.

I don't think that this should hook into (=change) existing behavior of action=parse. It would create inconsistent behavior between installations with FlaggedRevs and without FlaggedRevs installed, plus it would also require changing API documentation (which could work locally but would create confusion if someone checked the online documentation and wondered why they correctly followed the online docs but their installation behaves totally differently).