Page MenuHomePhabricator

"Error contacting the Parsoid/RESTBase server (HTTP 404)" in VisualEditor upon saving when a page has been deleted while you were editing it
Open, Needs TriagePublic

Assigned To
None
Authored By
matmarex
Sep 27 2020, 9:00 PM
Referenced Files
F32365822: image.png
Sep 27 2020, 9:00 PM
F32365814: image.png
Sep 27 2020, 9:00 PM
F32365812: image.png
Sep 27 2020, 9:00 PM
Subscribers

Description

When a page gets deleted while you're editing it using the visual editor, and you try saving your changes, you get the error "Error contacting the Parsoid/RESTBase server (HTTP 404)".

image.png (2×3 px, 357 KB)

You're supposed to see a different error, "The page has been deleted since you started editing.", with an option to continue saving anyway. This works correctly in new wikitext editor:

image.png (2×3 px, 361 KB)

Just for reference, this is also how the old editor works, although with an uglier interface:

image.png (2×3 px, 344 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thanks for splitting this off @matmarex. Completely agree that a more useful error would have been helpful here although not sure how common this sort of race condition is.

I thought a bit about how we would fix this, and there's a deeper problem here – we can fix the initial error message easily enough, but the "Continue" button is not going to work, because RESTBase will still respond with HTTP 404, because the revision that the edit is based on still doesn't exist, and the document can't be converted back to wikitext.

After T320529 this has a better error message: "The specified revision is deleted or suppressed." but the bug still occurs.