Help:Edit conflict

From Festipedia, hosted by the FR Heritage Group

An edit conflict happens when two people try to make conflicting edits to a page.

Imagine that you are editing a page. Whilst you are doing so, someone else (we'll call them 'Blanche') comes along and edits the same page. She finishes her changes first and saves the page. When you save the page, we have a conflict - saving your text will wipe out Blanche's changes. If the software is unable to merge your changes with Blanche's automatically, you will see an "edit conflict" page.

Automatic merging

When the conflict is detected, the software will first attempt to merge your changes with Blanche's automatically (for the technically minded, it uses diff3 to carry out the merge). In most cases this will succeed and the merged changes will be saved. You will not be notified of this automatic merge. You will only be able to detect the change by looking at the page history.

The result of automatic merging will always be correct, containing both your edits and Blanche's edits to the original text. It will only fail if you have both edited the same part of the article. However, your edits can be incompatible with each other even if they don't affect the same piece of text. For example, you and Blanche may both have added the same information to the article but in different locations. It is advisable check the page history and do a diff to make sure there are no problems.

The "Edit conflict" page

If the software is unable to merge your changes with Blanche's, you will see an edit conflict page. Blanche's text appears at the top of the page. At the bottom of the page is the text you tried to save. If you were editing a section of the page, you will see Blanche's text for the entire page but your text for just the section you were editing.

Between the two pieces of text the page will show a diff of the two versions, i.e. the page as it stands following Blanche's edit and the page as it would be with your edit. This will always be a diff of the complete page even if you are only editing a section.

You can edit the upper section and click on Save page. This will always save the entire page, even if you started off by editing a section. Those familiar with this functionality in MediaWiki/Wikipedia will know that it has a bug in this area requiring you to remove the other sections from the text before saving. FestWiki does not have the same problem.

Note that you cannot cause an edit conflict with yourself. The software assumes (rightly or wrongly!) that you know what you are doing and accepts the last version you submit.

Resolving a conflict

If you get an edit conflict, it is up to you to merge your changes with Blanche's to produce the finished page. If your changes were small, you should simply re-apply them to Blanche's text. If you made a lot of changes, you may be able to apply Blanche's changes to your text but it might be easier to start again. You should not simply post your changes over Blanche's (unless she has vandalised the page).

Undetected conflicts

Some people like to copy the text of the page into a separate editor, make their changes there then, when they are finished, start a new edit in the wiki and simply paste their changes back into the wiki. If someone else has changed the page in the meantime, their changes will be lost as there is no way for the software to detect this conflict. If you intend to edit the wiki in this way, you should either:

  • keep the original edit window open and paste your changes back into it, allowing the software to detect the conflict, or
  • check the page history before pasting your text to make sure no-one has changed it

Preventing conflicts

It is not possible for the software to prevent conflicts. However, if you know you are going to be editing a page for a long time, you might want to add the {{inuse}} template to warn other users not to edit it until you have finished. Make sure you remove the template when you post your edit.