Page MenuHomePhabricator

Mistake in filtered history page diff size
Closed, ResolvedPublic

Description

See
https://en.wikipedia.org/w/index.php?title=Milton_Keynes&action=history&year=&month=-1&tagfilter=possible+vandalism . Note that the diff size here is wrong, because the software has assumed for the fact that no more results were found that the diff must be for a page creation (thus ignoring the input of the tag filter).

Specifically, HistoryPager::historyLine() assumes that if there is no $next, the revision must be a page creation. That is simply untrue. It would probably be worth switching to instead look at rev_parent_id (which is 0 if and only if the revision is a page creation), in which case the bug collapses into #34922 (which deals with the unexpected consequences on rev_parent_id === null).


Version: 1.19
Severity: normal

Details

Reference
bz34978

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:12 AM
bzimport set Reference to bz34978.
bzimport added a subscriber: Unknown Object (MLST).

As Bawolff points out on IRC, the whole relation assumed here - that the next log entry is the preceding log entry - is at fault. This causes both the problem outlined in comment #1, but also faulty diff size entries where a filter has meant that some intervening edits have been removed. Thus it seems inevitable to me at least that this feature will have to be rewritten to based it on top of rev_parent_id (bug #34922 closed, see bug #34981 instead for problems with that approach).