Download & Extend

Revisions can be lost with multiple users editing

Project:Drupal core
Version:x.y.z
Component:node system
Category:bug report
Priority:normal
Assigned:Jerk Face
Status:closed (duplicate)

Issue Summary

Consider the following scenario:

  1. Alice starts editing a node without creating a new revision for that node.
  2. Bob starts creating a new revision of the same node.
  3. Bob submits his revision
  4. Alice submits her revision

Bob's revision is completely lost in this scenario. Alice's edit overwrites Bob's edit immediately and without warning.

What should happen is that after Alice clicks submit, she is shown the original content of the node, Bob's version of the node, a summary of the differences. She can then resubmit her post with Bob's changes included.

This merge screen should appear anytime a node has been modified in the time between starting editing and the node being submitted.

A fix for this bug should work with the patch for moving revisions to their own table: http://drupal.org/node/view/7582

Comments

#1

See Jeremy's lock API. It prevents conflicts like this. It needs a couple more advocates in order to be accepted into core.

#2

The lock API by itself does not solve this issue. It's job is to provide a low level locking mechanism.

Unfortunately, the low level mechanism provided by the lock API is not sufficient for solving this problem.

Consider the following:
Alice opens a node for editing (taking out a lock on it)
5 minutes pass, Alice is still writing.
The lock times out
Bob opens a node for editing
Bob saves his changes
Alice saves her changes
Bob's changes are gone.

#3

The discussion on the Lock API thread has changed, so that it's now only about this bug.

http://drupal.org/node/6025