Topic on Extension talk:RevisionSlider

Issue: Revision slider doesn't display the yellow lines properly when current revision is older than the one being compared

10
Summary by Christoph Jauera (WMDE)

RevisionSlider breaks when revision ids do not increase in time. See ticket: https://phabricator.wikimedia.org/T164455

197.218.90.84 (talkcontribs)

Problem

Revision slider displays the yellow pointer outside the "revision bar area" when current revision (diff=) is numerically smaller than the one being compared (oldid).

Steps to reproduce

  1. Go to https://en.wikipedia.beta.wmflabs.org/w/index.php?diff=158491&oldid=172031&title=Main_Page&type=revision
  2. Click the button to load the revision slider

Expected Blue and yellow lines showing properly and not going off screen.

Actual Yellow line appears outside (to the right) of the revision bar area .

URL shows: https://en.wikipedia.beta.wmflabs.org/w/index.php?diff=NaN&oldid=NaN&title=Main_Page&type=revision

Notes: While this is a contrived example, because it isn't really easy to cause using the revision slider (unless one clicks the arrow as reported previously) it can still happen on live wikis because users can paste these links, or type them incorrectly. So the interface should fallback gracefully, switch them around, or reject such revisions.

197.218.90.84 (talkcontribs)

Here's a priceless image after causing this layout issue, and then clicking the left arrow :) :

http://imgur.com/a/elUdA

Christoph Jauera (WMDE) (talkcontribs)

Hey there,

from the link you provided I can see, that the numbers of the revisions are a bit strange. I think this is something that can only happen on beta. It seems the slider gets confused if the revision ids are not ascending the newer they are. This should not happen on any normal wiki.

Since most fixes for the bugs reported in the new UI should be deployed now you could as well do tests on https://test.wikipedia.org . I assume the above error won't appear there.

Thanks again for the great feedback,

Christoph

IKhitron (talkcontribs)

Told you.

197.218.91.204 (talkcontribs)

>  I assume the above error won't appear there.

You're too trusting of MediaWiki. It has huge hacks everywhere, and it is quite easy to replicate the problematic part of this even in test.wikipedia.

Steps to reproduce

  1. Go to https://test.wikipedia.org/w/index.php?title=User:Rocket000&action=history
  2. Click radio button of revision :" 15:43, 26 January 2008‎" -comment : "(making me blue)
  3. Click radio button of revision:  01:41, 20 January 2008‎  - (Undid revision 185552525 by Rocket000 (talk))
  4. Click compare selected revisions
  5. Click button to trigger revision slider

Expected

  • Yellow line showing properly and not going off screen.

Actual

  • Yellow line appears outside (to the right) of the revision bar area .

This can even be replicated on live wikis easily:

Select these two revisions in the radioboxes of (https://www.mediawiki.org/w/index.php?title=Extension:ExpandCss&action=history), and repeat steps 4 and 5 in the list above.

(cur | prev) 16:54, 27 November 2006‎ HappyDog (talk | contribs)‎ m . . (3,033 bytes) (+32)‎ . . (ExpandCss moved to Extension:ExpandCss: Moved to Extension: namespace.) (undo)
(cur | prev) 16:15, 27 October 2006‎ Lcarsdata (talk | contribs)‎ m . . (3,001 bytes) (+20)‎ . . ({{MoveToMediaWiki}}) (undo)

Or try this link ( although the steps above can reproduce it):

Christoph Jauera (WMDE) (talkcontribs)

Wow, we really did not thought that something like that could happen. The RevisionSlider assumes in parts of its logic, that revision ids are increasing in time but if thats not always the case we definitely should take care of it. I will file a ticket right away.

Thanks again for all your effort, we really appreciate it. :-)

Christoph

TheDJ (talkcontribs)

The most important reason why this would not be the case, is when edits have been imported and then get merged into an existing page. This is quite common on english wikipedia, where some pre 2002 revisions have been retroactively imported from nostalgia.wikipedia.org because they got lost during the initial import.

Note Graham's notes on this procedure: https://en.wikipedia.org/wiki/User:Graham87/Import point 7 specifically :)

197.218.89.38 (talkcontribs)

Indeed, that's how those revisions were "easily" found . All that was needed was looking at pages using the import logs. Anyone who has used mediawiki import would be aware that it uses a very strange hack, and causes all sorts of inconsistencies in revisions.

You might want to use the timestamp (API:Revisions) instead:

  • rvstart: Timestamp to start listing from. (enum)
  • rvend: Timestamp to end listing at. (enum)

When two timestamps happen to be the same, then the revision id could be used as a tie breaker. Of course this may require more work than just adding a small hack when the "diff=" is smaller than the oldid. Alternatively just wait until this is solved by mediawiki developers (https://phabricator.wikimedia.org/T4930#3210154).

This post was hidden by IKhitron (history)
Christoph Jauera (WMDE) (talkcontribs)

Just a small update here:

The RevisionSlider does not assume that revids increase in time since some time now. The issue shown in https://www.mediawiki.org/w/index.php?title=Extension%3AExpandCss&type=revision&diff=50164&oldid=51766 should be fixed.

For the issue of users sharing links using the parameters wrong ( putting the "oldid" into the "diff" parameter and the other way around ) as shown in https://en.wikipedia.beta.wmflabs.org/w/index.php?diff=158491&oldid=172031&title=Main_Page&type=revision there's a ticket for that so we have it on or monitors. https://phabricator.wikimedia.org/T168609

Reply to "Issue: Revision slider doesn't display the yellow lines properly when current revision is older than the one being compared"