Enhanced Recent Changes links time to previous version and cur does not give cumulative diff
Closed, ResolvedPublic


Author: patrick.wikipedia

Enhanced Recent Changes gives, for pages for
which there are multiple edits, after pressing
the downward arrow, on each line:

  • the time, linked to the page version

just ''before'' this time, instead of the
version created at this time

  • the link "cur" to the diff page for the edit

concerned, just like "last", instead of the
cumulative diff

Version: 1.5.x
Severity: normal


bzimport set Reference to bz2894.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 18 2005, 8:16 AM

patrick.wikipedia wrote:

I suggest uniformity with the links on the Page
History page:

with regard to the time link (on the Page
History page with date): link to the version
created then

with regard to "cur": link to the cumulative
diff of the edits after (hence not including)
the one at the specified time

pkchan+bug=mediawiki wrote:

Reproducible on 1.5.0.

pkchan+bug=mediawiki wrote:

May I know the status of this bug? It is a grave error on the software because
the links provided link to the wrong version/diff -- and for an intensive online
collaboration of critical contents this may prove fatal as the wrong version may
have been reverted.

It's reproducible on 1.5.2.

pkchan+bug=mediawiki wrote:

Patch of includes/ChangesList.php for fixing this bug.

Can't wait for the fix, so attempted my own: patch for making the changes list
on Enhanced Recent Changes in line with that of the page history, with the
following two changes:

i. the timestamp (of an entry as expanded from a page with multiple edits) now
links to the version saved as of that time, and not the previous version;
ii. the "cur" link (of an entry as expanded from a page with multiple edits)
now links to the cumulative diff from the version saved as of that time to the
current version.

This patch works on my site. However I do not profess to be familiar with the
relevant code so 1. this may have broken a few other things and 2. it may have
violated some design philosophy. Two questions specifically in my mind are:

a. I do not know how to generate the latest version id on ChangesList.php (as
in the function getLatestID in PageHistory.php), so I just used the old method
(as in 1.4.*) and supply zero as the current version for the cumulative diff

b. I don't quite understand why is the same $query shared for the "cur" and
"diff" links when apparently these two serve different purposes; I just split
them up into $querycur and $querydiff for the two purposes as a result.

attachment ChangesList.php.diff.txt ignored as obsolete

brion added a comment.Nov 23 2005, 5:54 PM

Patch does not apply to CVS HEAD.

Trying to fix...

brion added a comment.Nov 23 2005, 6:06 PM

Created attachment 1092
Patch for 1.6 (CVS HEAD)

Also fixes the diff links to use the correct version.

Attached: 2894-head.diff.txt

brion added a comment.Nov 23 2005, 6:38 PM

Created attachment 1093
Patch for REL1_5, with link fix

Fixed version of the patch for 1.5.

If a page's first revision was in the list, the time-link was missing the
revision number so would link to the current version instead.

Attached: 2894-rel1_5.diff

brion added a comment.Nov 23 2005, 6:45 PM

Committed to HEAD and REL1_5. Thanks for the fix!

Add Comment