Page MenuHomePhabricator

?oldid=mostRecentRevId causes strange behavior on second edit
Closed, ResolvedPublic8 Estimated Story Points


  1. Go to /wiki/Some_page?oldid=123 where 123 is the oldid of the most recent revision (e.g. ; go to the history and click the topmost timestamp)
  2. Click the edit tab to open VE
  3. Make changes
  4. Save
  5. Click edit again
  6. Be surprised that you're in oldid mode and don't see the changes you just made

If you do this with any other oldid (i.e. the ID of an actually-old revision), you will now be editing the most recent revision of the page. However, because the oldid is the most recent ID, VE gets confused and goes into oldid mode. We should never be in oldid mode on the second edit.

Event Timeline

Turns out Timo realized something was wrong when he wrote this code back in 2013: (that comment is still there in DesktopArticleTarget#saveComplete)

Change 301056 had a related patch set uploaded (by Catrope):
Reduce mayhem caused by ?oldid=currentRevId

Change 301056 merged by jenkins-bot:
Reduce mayhem caused by ?oldid=currentRevId

Jdforrester-WMF assigned this task to Catrope.
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.