Page MenuHomePhabricator

VisualEditor: Restoring oldids broken
Closed, ResolvedPublic

Description

On attempting to edit and restore an oldid, everything works fine (oldid contents appear, diff shows correct wikitext change, etc.) but on save VE appears to send the wrong page version (presumably the 'newer' version that's meant to be replaced?) to MW so nothing gets saved.


Version: unspecified
Severity: critical

Details

Reference
bz49390

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:05 AM
bzimport set Reference to bz49390.

I can't reproduce this bug. I'll keep the assignment to Ed but it looks like this has been resolved in the mean time.

I can reproduce it. Tellingly, if you make a change and then press save you get an edit conflict. I suspect the problem is we are providing the timestamp of the version you choose to edit as the 'basetimestamp' which I don't think is right. When you hit save the API thinks all the versions ahead of the version you're editing were created since you loaded the page (hence the edit conflict scenario).

I think 'basetimestamp' should always be populated with the timestamp of 'cur', regardless of which version you are editing, but would like confirmation from someone who knows the MW API better.

Ed is exactly right. EditPage appears to set basetimestamp this way as well.

Related URL: https://gerrit.wikimedia.org/r/69344 (Gerrit Change Icacaa5101386e52309278c8d9871ca1193aa86a9)

Merged and will go out with next deployment.