Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
book.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
20 Oct 2006 at 21:40 UTC
Updated:
21 Nov 2006 at 07:17 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | book-revisions_0.patch | 3.56 KB | kkaefer |
| #8 | book-revisions.patch | 10.68 KB | kkaefer |
| #5 | book_49.patch | 2.89 KB | mj2308 |
| #3 | book_nodeapi_2.patch | 1.97 KB | joshk |
Comments
Comment #1
webernet commentedDuplicate of: http://drupal.org/node/67638
Comment #2
Zack Rosen commentedi figured someone else would have found this, but i couldnt find the report... ;) thanks!
Comment #3
joshk commentedPatch 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.
Comment #4
edmund.kwok commentedPatch not in the proper format, please resubmit using diff -uF^f
Comment #5
mj2308 commentedhi 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?
Comment #6
webernet commentedNot a proper patch. See: http://drupal.org/diffandpatch
Bug also present in HEAD.
Comment #7
pwolanin commentedAn 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.
Comment #8
kkaefer commentedBook.module related values (parent, weight) are now in $node->book. This patch could be slow down node loading time because it queries the book
Comment #9
kkaefer commentedWithout the renaming, it's much smaller (and the potential to cause additional bugs is lower).
Comment #10
webernet commentedWith 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
Comment #11
drummCOmmitted to HEAD.
Comment #12
(not verified) commented