Page MenuHomePhabricator

Deal with rvslots deprecation warning
Open, MediumPublic


Since MW 1.32 was released we get load of:

Because "rvslots" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future ..

Despite I got a feeling before we implement rvslots properly, the whole feature might be deprecated itself - I mean seriously - check the change log - MW devs deprecate stuff faster than ever, and they were too fast even before:

v1.30: Deprecated rvdifftotextpst
v1.27: Introduced rvdifftotextpst

we should probably still do something about it, these warnings are very annoying in the system logs (unless you disable them). I did some observation, fix seems as easy as providing rvslots=* as a parameter (despite I don't fully yet understand what it is good for) which changes the ouput from:

<?xml version="1.0"?><api><query-continue><revisions rvcontinue="20190716172444|19206906" /></query-continue><query><pages><page _idx="10411452" pageid="10411452" ns="0" title="Huggle/Config.yaml"><revisions><rev contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">


<?xml version="1.0"?><api><query-continue><revisions rvcontinue="20190716172444|19206906" /></query-continue><query><pages><page _idx="10411452" pageid="10411452" ns="0" title="Huggle/Config.yaml"><revisions><rev><slots><slot contentmodel="wikitext" contentformat="text/x-wiki" role="main" xml:space="preserve">

Which isn't too different, but still different enough to need serious code changes that are going to be incompatible with older mediawiki. This is real PITA to be honest - if we do the change, Huggle will work with MW 1.32+ but will break for all older MWs.

Correct solution would be to check MW version first (unfortunatelly we figure out MW version AFTER we send the query that would have needed the rvslots parameter) and then decide how to do this. That requires lot of time that I don't have.

Incorrect solution is to simply rewrite the code and make all Huggle's since next version incompatible with MediaWiki older than 1.32. Which is not OK, but I will probably have to go that way... Unless someone else has any better ideas, or is willing to implement correct solution (but how?)

Related Objects

Event Timeline

Petrb triaged this task as Medium priority.Apr 5 2020, 8:31 PM
Petrb created this task.
Petrb updated the task description. (Show Details)
Petrb added a comment.Apr 6 2020, 3:09 PM

So the proposed fix should be implemented as this:

  • Create some global variable (ProjectConfiguration) bool SupportsRVSlots
  • Before login to each project run this API query action=paraminfo&modules=query+revisions
  • Check if query contains slots information, and update global variable according to that
  • Each subsequent revisions API call should examine this global variable and build the query according to it per each project
Petrb claimed this task.Jul 22 2020, 1:34 PM