When several users make changes to the same book hierarchy using the admin book outline page (admin/content/book/nid), the whole structure may end messed up.
For example, if user A deletes book node X, and at the same time, user B saves the previous tree of book pages with X´s title changed, the titles of all nodes beneath node X get changed. This is evidenced in wachtdog entries like the following:
content May 7 2008 - 18:03 book: updated 5 Areas of Activity Needed ... Administrator view
content May 7 2008 - 18:03 book: updated The Origin and Emergence of ... Administrator view
content May 7 2008 - 18:03 book: updated What is the relationship ... Administrator view
content May 7 2008 - 18:03 book: updated Using Emergence to Take ... Administrator view
content May 7 2008 - 18:03 book: updated The movement: beyond ... Administrator view
content May 7 2008 - 18:03 book: updated Influencing, moderating, ... Administrator view
content May 7 2008 - 18:03 book: updated Evolution's Arrow by ... Administrator view
somewhat showing a massive simultaneous update!
Attached is a simpletest test case demostrating the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| book_outline.test | 3.34 KB | patricio.keilty |
Comments
Comment #1
EvanDonovan commentedI have encountered this bug also. Unfortunately, the only way we could recover from it was to restore the entire SQL database to a recent backup; just restoring the book table was not sufficient.
Since experiencing this, I have decided that editing the book hierarchy is simply too risky, at least as it is in Drupal 5.7.
Comment #2
patricio.keilty commentedYeap, it has been a real pain. I also needed to restore, from recent backup, the node and node_revision tables for book type, and the book table. This was enough for me.
I wonder how they do on books heavy sites like Drupal.org where lots of users are editing them at the same time... ? My guess is they do not use the admin pages at all, otherwise they had already noticed this....
Comment #3
drummThis would still be a problem in HEAD. The easiest thing to implement would be disallowing saving if another user saved while editing. Editing content does this and has a "This content has been modified by another user, changes cannot be saved," message.
Comment #4
EvanDonovan commentedYes. Some kind of locking would be great. Are you saying that no one would be able to save a book node while the hierarchy was being edited, or that no one would be able to save the hierarchy while a node was being edited?
Comment #5
alexanderpas commentedno-one would be able to save the hierarchy if the hierarchy was changed by another user while they were working (that would be the solution)
Comment #6
pwolanin commentedThis bug should already be fixed in 6.3, 6.x, and 7.x see: http://drupal.org/node/272900
Comment #7
pwolanin commentedplease set to "duplicate" if it is, in fact, the same bug. or "to be ported" if the bug exists in 5.x still but not 6.x.
Comment #8
patricio.keilty commentedMarked as duplicate, was fixed check http://drupal.org/node/272900 .