Page MenuHomePhabricator

Flow pages: better warning info/handling for edit conflicts
Open, Needs TriagePublic

Description

The behavior described below is specific to Flow pages.

  1. Two different users (from two different browsers) make edits to the same post. First user saves the post; the second user immediately adds some other edits and attempts to save it too.
  2. The second user receives the warning: "Another user just edited this post a few seconds ago. Are you sure you want to overwrite the recent change?" - agreeing to overwrite, the second user clicks again on 'Save changes' button.
  3. Edits are not saved; the warning is still displayed - the second user is forced to click on 'Cancel'.

Editing a board description presents even worse scenario:

  1. Given the same two users (as in the step #1 above) - the first user edits the board description.
  2. Immediately the second user attempts to edit it too - "Another user just edited this post a few seconds ago. Are you sure you want to overwrite the recent change?" is displayed and cannot be dismissed even with clicking on 'Cancel'. The warning disappears only after refreshing the page.

Network tab displays the following:

{servedby: "deployment-mediawiki01", error: {code: "ehprev_revision",…}}
error:{code: "ehprev_revision",…}
*:"See http://en.wikipedia.beta.wmflabs.org/w/api.php for API usage"

code: "ehprev_revision"

info:"Another user just edited this post a few seconds ago. Are you sure you want to overwrite the recent change?"

prev_revision:{revision_id: "t6xj3nuk3uk6wyzc"}

revision_id:"t6xj3nuk3uk6wyzc"

servedby:"deployment-mediawiki01"

Note:
Edits conflicts are handled by VE/wikitext editor on regular pages in a more user-friendly way:
The warning has a link to page that helps to resolve the conflict:

Screen Shot 2016-07-01 at 3.37.55 PM.png (367×1 px, 66 KB)

A wikitext page for resolving conflicts has detailed instructions on how to do it:
Screen Shot 2016-07-01 at 3.38.14 PM.png (271×1 px, 86 KB)

Event Timeline

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