Page MenuHomePhabricator

Revision.parentid only exists in MediaWiki v1.16+
Closed, DeclinedPublic

Description

{25a0cc1d} introduced a hard requirement that the API revision result contains a parentid.

However the MediaWiki documentation was not correct, and this value is only provided by API v1.16+.
https://www.mediawiki.org/w/index.php?title=API:Revisions&diff=1914811&oldid=1914810

As a result, that commit broke support for v1.14+.
The bug has been fixed, but the issue of how to support 1.14-15 remains open.

Event Timeline

jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb subscribed.

Change 246183 had a related patch set uploaded (by John Vandenberg):
Remove requirement for Revision.parentid to exist

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

Change 246183 merged by jenkins-bot:
Remove requirement for Revision.parentid to exist

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

I'm wondering how we could add support for that on older wikis. In theory if we query revisions in order and have queried the next (or if reversed, the previous) revision we could use that id but might cause problem because of T91883: prop=revisions sorts by rev_id, not by rev_timestamp.

jayvdb lowered the priority of this task from High to Low.Oct 15 2015, 12:31 AM
jayvdb moved this task from Backlog to Backwards compatibility on the Pywikibot board.
jayvdb updated the task description. (Show Details)
jayvdb removed a project: Patch-For-Review.
jayvdb set Security to None.

If we query using rvendid=[Page.revid]&rvdir=older&rvlimit=2, the first revision should be the parent?
It wouldnt be very efficient if parentid is needed for many Revisions, but this is for very old wikis, so I'd prefer bad performance with a simple algorithm rather than very complex code which has only marginal performance improvements and is likely to only be used infrequently.

Xqt subscribed.

MW support of pre 1.19 will be dropped