Steps to recreate:

- Book enable a node type
- Create a node of that node type
- 'Outline' the node
- Create a new revision of the node

You're outline for that node will now disappear. This is because book module does not create a new row in the book table for the new node version.

Comments

webernet’s picture

Status: Active » Closed (duplicate)
Zack Rosen’s picture

i figured someone else would have found this, but i couldnt find the report... ;) thanks!

joshk’s picture

Version: 4.7.3 » 4.7.4
Status: Closed (duplicate) » Needs review
StatusFileSize
new1.97 KB

Patch brings book.module into the full flower of the nodeapi era.

Basically I've subsumed the hook_load, hook_update and hook_delete functions into nodeapi. I also changed some checks on book_load to check for is_numeric($node->parent), which will return true if it's 0 (a root level book) or a child of some other node. It will return false if $node-parent is NULL.

edmund.kwok’s picture

Status: Needs review » Needs work

Patch not in the proper format, please resubmit using diff -uF^f

mj2308’s picture

Status: Needs work » Needs review
StatusFileSize
new2.89 KB

hi I rerolled the patch.. Also tested it on a fresh install of 4.7.4 without any contrib modules (except for OG) and it seems to do its job.. would this be sufficient to get it to be committed?

webernet’s picture

Version: 4.7.4 » x.y.z
Status: Needs review » Needs work

Not a proper patch. See: http://drupal.org/diffandpatch

Bug also present in HEAD.

pwolanin’s picture

An even better way to deal with this would be to drop the use of revisions (vid) from book module. IMNSHO, since you can't really recover the book structure by reverting a revision, it seems pointless to try to retain the parent info per node.

kkaefer’s picture

Status: Needs work » Needs review
StatusFileSize
new10.68 KB

Book.module related values (parent, weight) are now in $node->book. This patch could be slow down node loading time because it queries the book

kkaefer’s picture

StatusFileSize
new3.56 KB

Without the renaming, it's much smaller (and the potential to cause additional bugs is lower).

webernet’s picture

Status: Needs review » Reviewed & tested by the community

With Patch in #9:
Created new page, added to outline, created new revision, reverted revision, deleted page - All OK
Created new book page, created new revision, reverted revision, deleted book page - All OK

drumm’s picture

Status: Reviewed & tested by the community » Fixed

COmmitted to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)