Page MenuHomePhabricator

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


rPWBC25a0cc1d1502: Add Revision.parent_id and Revision.content_model 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+.

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 created this task.Oct 14 2015, 7:38 AM
jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb added a subscriber: jayvdb.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 14 2015, 7:38 AM

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

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

XZise added a subscriber: XZise.Oct 14 2015, 12:57 PM

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 closed this task as Declined.Mar 9 2020, 12:01 PM
Xqt added a subscriber: Xqt.

MW support of pre 1.19 will be dropped