Page MenuHomePhabricator

Edit conflicts not mentioned or managed properly
Closed, InvalidPublic

Description

(bug 37828 is about handling edit conflicts)

VE does not inform the user that changes have been made by another user, so the review your changes screen has unexpected changes in it, and the user is allowed to save without reviewing the edit conflict.

Worse(and I will raise a separate bug for this), VE caches the diff, which means if no content is changed, the user is shown
a) a stale diff and is allowed to proceed with saving the page, which means they are then
b) the page with their saved changes only
The user is unaware that they have overwritten another persons changes.

Steps to reproduce:

  1. Create a page with some two lines https://en.wikipedia.org/w/index.php?title=User:John_Vandenberg/test&oldid=573748285
  2. Open the page in two VE windows
  3. In the second window, alter the first line and save https://en.wikipedia.org/w/index.php?title=User:John_Vandenberg/test&oldid=576079696
  4. In the first window, alter the first line and review changes (the diff only shows the first line being modified against the page contents from step 3)
  5. In the second window, add some lines and save https://en.wikipedia.org/w/index.php?title=User:John_Vandenberg/test&oldid=576079807
  6. In the first window, review changes, and cancel the save (the diff is the same as in step 5; the VE page content doesnt change)
  7. In the first window, save

Actual results:
The lines added in step 6 are removed by step 8.
The page after step 8 shows only the changes made in the first VE window.

Expected results:
In step 5 & 7, there should be a notice that the page has changed by someone else

In step 7, the diff should be refreshed even though the page content has not been modified.

In step 5 & 7, the VE should smartly determine whether the conflicts can be automatically resolved _and_ the user should
a) be forced to review changes and not allowed to save until they have reviewed and accepted the changes
b) be able to 'accept' the new changes by other users (i.e. those lines shown initially show as lines to be removed); view a refreshed diff; and proceed to save, in which case the next view is of the saved & integrated changes.
c) be able to cancel the save and return to VE with the new changes (as are being seen on their diff) merged into their VE session if it can be done sanely.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=55613
https://bugzilla.wikimedia.org/show_bug.cgi?id=55393

Details

Reference
bz55392

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:11 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz55392.

VE cannot determine whether the user's changes can be merged without attempting to dummy-save it via Parsoid into MediaWiki and finding out the result; this is a tens-of-seconds process, and difficult to see how "VE should smartly determine whether the conflicts can be automatically resolved". If they can be, it just saves.

Could you boil this down into a simple ask (or two, or six, each in their own bug)?

For example:

"a) be forced to review changes and not allowed to save until they have reviewed
and accepted the changes"

This is way, way beyond what the wikitext editor does (non-conflicting changes just save). Why on Earth would you make VE users inspect a non-conflicting diff, but not for wikitext editors?

"b) be able to 'accept' the new changes by other users (i.e. those lines shown
initially show as lines to be removed); view a refreshed diff; and proceed to
save, in which case the next view is of the saved & integrated changes."

This is exactly what happens - if you have an edit conflict, VE informs you as such and takes you to the regular wikitext edit conflict page, where you have (a) your wikitext, (b) their wikitext, and (c) a diff between the two, and an opportunity to save it.

I'm afraid there are occasions in which this does not happen.
As user:Jay8g reports,
<<I tested it at mw:sandbox (up to date and no customization) in these two edits https://www.mediawiki.org/w/index.php?title=Project:Sandbox&diff=917496&oldid=917357 - https://www.mediawiki.org/w/index.php?title=Project:Sandbox&diff=917498&oldid=917496 (I saved "edit 1" while having the "edit 2" window open) and it still had no warning (see screenshots) (Monobook (en) and Vector (mw), Firefox 27.0.1, Windows 7)>>.
Here is the screenshot, https://en.wikipedia.org/wiki/File:VE_lack_of_edit_conflict_warning.png , and I can confirm the browser doesn't matter since I could replicate this in the same page.

(In reply to Elitre from comment #2)

I'm afraid there are occasions in which this does not happen.
As user:Jay8g reports,
<<I tested it at mw:sandbox (up to date and no customization) in these two
edits
https://www.mediawiki.org/w/index.php?title=Project:
Sandbox&diff=917496&oldid=917357 -
https://www.mediawiki.org/w/index.php?title=Project:
Sandbox&diff=917498&oldid=917496 (I saved "edit 1" while having the "edit
2" window open) and it still had no warning (see screenshots) (Monobook (en)
and Vector (mw), Firefox 27.0.1, Windows 7)>>.
Here is the screenshot,
https://en.wikipedia.org/wiki/File:VE_lack_of_edit_conflict_warning.png ,
and I can confirm the browser doesn't matter since I could replicate this in
the same page.

That's MediaWiki core functionality; if you're logged in, you can't edit conflict with yourself, and new edits silently over-write.

Usually you do can get edit conflict with yourself if you double click the saving button or do something like that.

Ah but IDK if it possible in VE. I've forgotten what this bug is about ^^