Page MenuHomePhabricator

When editing current version of a page, oldest revision (with highest "oldid") shows up in edit form
Closed, ResolvedPublic

Description

Author: hhw1ry202

Description:
When editing the current version of a page at the italian Wikipedia, in some cases the oldest
version is shown in the edit box instead. An example is to be seen at the page
http://it.wikipedia.org/wiki/Klingon
The following edit by the user 5Y:
http://it.wikipedia.org/w/index.php?title=Klingon&diff=476681&oldid=426011
was done by a simple PHP script that GETs the URL
http://it.wikipedia.org/w/index.php?title=Klingon&action=edit
and does a preg_replace() on the content of the textarea to disambiguate links (in this case
"Capitale"). Comparing the oldest revision and the one by 5Y shows that it must have received the
oldest revision instead of the current one:
http://it.wikipedia.org/w/index.php?title=Klingon&diff=476681&oldid=475981

The same thing must have happened to other users editing pages manually. Here are two examples
where the user only wanted to add a category link:
http://it.wikipedia.org/wiki/Plugin
http://it.wikipedia.org/wiki/Monastero_di_Rila
Here are the diffs between the problematic edit and the previous one:
http://it.wikipedia.org/w/index.php?title=Plugin&diff=458434&oldid=427270
http://it.wikipedia.org/w/index.php?title=Monastero_di_Rila&diff=458428&oldid=438260
And these are the diffs between the problematic edit and the oldest revision:
http://it.wikipedia.org/w/index.php?title=Plugin&diff=458434&oldid=457838
http://it.wikipedia.org/w/index.php?title=Monastero_di_Rila&diff=458428&oldid=457790

There have been more occurrences of this problem. If necessary, we can try to find them again.


Version: 1.4.x
Severity: major
URL: http://it.wikipedia.org/w/index.php?title=Klingon&action=history

Details

Reference
bz1750

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:17 PM
bzimport set Reference to bz1750.
bzimport added a subscriber: Unknown Object (MLST).

Wiki.Melancholie wrote:

(In reply to comment #0)

When editing the current version of a page at the italian Wikipedia, in some

cases the oldest

version is shown in the edit box instead. An example is to be seen at the page
http://it.wikipedia.org/wiki/Klingon
The following edit by the user 5Y:
http://it.wikipedia.org/w/index.php?title=Klingon&diff=476681&oldid=426011
was done by a simple PHP script that GETs the URL
http://it.wikipedia.org/w/index.php?title=Klingon&action=edit
and does a preg_replace() on the content of the textarea to disambiguate links

(in this case

"Capitale"). Comparing the oldest revision and the one by 5Y shows that it

must have received the

oldest revision instead of the current one:
http://it.wikipedia.org/w/index.php?title=Klingon&diff=476681&oldid=475981

The same thing must have happened to other users editing pages manually. Here

are two examples

where the user only wanted to add a category link:
http://it.wikipedia.org/wiki/Plugin
http://it.wikipedia.org/wiki/Monastero_di_Rila
Here are the diffs between the problematic edit and the previous one:
http://it.wikipedia.org/w/index.php?title=Plugin&diff=458434&oldid=427270

http://it.wikipedia.org/w/index.php?title=Monastero_di_Rila&diff=458428&oldid=438260

And these are the diffs between the problematic edit and the oldest revision:
http://it.wikipedia.org/w/index.php?title=Plugin&diff=458434&oldid=457838

http://it.wikipedia.org/w/index.php?title=Monastero_di_Rila&diff=458428&oldid=457790

There have been more occurrences of this problem. If necessary, we can try to

find them again.

(In reply to comment #1)
Exactly the same happened on April 3rd, 2005 on the German Wiktionary in the
entry [http://de.wiktionary.org/w/index.php?title=%E8%88%B9&action=history]
(please see [Wikipedia:Village_pump_%28technical%29#Serious_software_problems.21
village pump] for more information)!! -- ~~~~

zigger wrote:

In all five cases, the oldest revision id had an out-of-sequence value, being
higher than the current revision. This was consistent enough that you can
predict where it went wrong just from looking at the "oldid"s in the histories:

http://it.wikipedia.org/w/index.php?title=Klingon&action=history
http://it.wikipedia.org/w/index.php?title=Plugin&action=history
http://it.wikipedia.org/w/index.php?title=Monastero_di_Rila&action=history
http://de.wiktionary.org/w/index.php?title=%E8%88%B9&action=history
http://bg.wikipedia.org/w/index.php?title=Diablo_%28%D0%B8%D0%B3%D1%80%D0%B0%29&action=history

Coincidence?

Is this still an issue in 1.4.5 and HEAD?

Probably caused by bad merging of duplicate 'cur' table revisions when we finalized the
unique indexes sitewide. In some cases it picked the older instead of the newer version
to keep, which would most likely be a duplicate submission of the original page creation
(there were some bugs with simultaneous creation which could get triggered by multiple
submissions when response time was very large).

The preconditions for this are no longer possible (the page table has a unique index on
titles, making duplicates impossible), though it's possible that other pages remain for
which an older version was kept as cur during the index updates months ago.

wclark wrote:

Marking this bug as FIXED per Brion Vibber's comments above (and assuming that
there are no lingering timebombs waiting from a year ago).