Page MenuHomePhabricator

edit api conflict on deleted and restored files.
Closed, ResolvedPublic


I experienced an issue trying to use edit api on this file:

This happened after I had deleted and then restored the page, see also the log of that here: . Whatever I tried, I couldn't make an edit to that page then. Every time I got: {"error":{"code":"pagedeleted","info":"The page has been deleted since you fetched its timestamp"}}

I tried purging the page and my browser, tried waiting a while (2 hours) and switching browsers, the problem would not go away. Perhaps the delete and restore timestamps were too close, confusing editconflict detection, or possibly, the api is looking at the last time of deletion and last time of edit, not realising that an undeletion of the page is an event that can occur after those two times.

I finally solved it by making an edit to the page with the normal interface. After that, everything went like clock work.

Version: 1.17.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:01 PM
bzimport set Reference to bz24665.

Fixed in r70557. The bug was in the code faking the value of starttimestamp when it's not specified. It would have been possible to resolve this situation without editing through the UI by simply setting starttimestamp to a timestamp after the deletion.