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.

CommentFileSizeAuthor
book_outline.test3.34 KBpatricio.keilty

Comments

EvanDonovan’s picture

I 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.

patricio.keilty’s picture

Yeap, 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....

drumm’s picture

Version: 5.7 » 7.x-dev

This 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.

EvanDonovan’s picture

Yes. 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?

alexanderpas’s picture

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?

no-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)

pwolanin’s picture

This bug should already be fixed in 6.3, 6.x, and 7.x see: http://drupal.org/node/272900

pwolanin’s picture

Status: Active » Postponed (maintainer needs more info)

please 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.

patricio.keilty’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Marked as duplicate, was fixed check http://drupal.org/node/272900 .