Page MenuHomePhabricator

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


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

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).

Wugapodes added a subscriber: Wugapodes.

Having action=parse return something other than the most recent revision is a bad idea. There might be value in creating a flag that allows the user to signal their preference for stable revisions like parsestable=true, but I agree with Aklapper that this should not be the default behavior.