Steps to reproduce the problem:
1. create a new page with only a title
2. set the book option to create a new book
3. set the published option to not published
4. save the page
5. lookup the page in edit
6. result: page seems coupled to the first existing book in the list
Expected result:
a new book is created with the given title of the page as title of the book.
Instead the bookpage seems not coupled to a new book
Remark: the same result is gained when first publishing the page as a new book (this works as expected).
Subsequently change the bookpage to not-published and when doing edit after saving, the new book will have disappeared.
OS = FreeBsd (hosted webserver): FreeBSD wh-www13.xs4all.nl 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #0: Wed i386
webserver = Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7d
PHP = PHP Version 5.2.6
Drupal = Drupal version 6.4
Comments
Comment #1
Flying Drupalist commentedThis is a huge problem.
Comment #2
fab65 commentedI have the same bug. The issue is due during creation of option default list (function book_get_books() in book.module l.256).
The query SQL return node with status = 1. But for node unpublish, status is equals to 0.
One solution is to replace :
line 267
by
Can you tell me if it's a good idea?
Comment #3
chawl commentedfab65 thank you very much, works great for dropdowns but "Add child page" and "book navigation" is missing.
By the way this, or a similar solution should, has to, must be committed.
It is really ridiculous to not to be able to create a book as a draft and publish at once.
How on earth our authors will send "a book" to editors for moderation?
Even reconstructing the original page order will be a pain.
Drupal is really shocking sometimes. Sigh.
Comment #4
jshprentz commentedI have the same problem in 6.12.
Comment #5
chawl commentedIntentionally bumped.
Comment #6
dazweeja commentedSame issue here. Create a new node, choose Create new book from Book outline fieldset, set node to unpublished, save node. At this point, the book table is fine. But there's no way to publish the node without breaking the book because if you edit the book, the dropdown in the Book outline will be set to the first book in the dropdown and the new book that was created won't exist in the dropdown menu. Bit of a showstopper for me as I need my pages to always be initially set to unpublished.
Comment #7
sven h commentedHave similar problems after upgrading from 5."low" to 6.16
Old books do not show hierarchy, new book lets itself be created (the first page allows to be top) but this new book does not appear in list of books, only the old book from before upgrade shows up in this list.
When editing the new first page it is shown as book but when editing older book pages the new book does not appear.
I have tried both published and unpublished pages, can't get it to work...
Oh, "add child page" appeared below book page after creating role "admin" and giving it permission to do all things book related. I found this necessary for more functions in drupal 6.
Edit:
After more digging it seems to work like this:
You need to have a role that has all book related permissions
All pages in the book need to be published
Comment #8
mr.andrey commentedsubscribing... big problem, 6.16
Comment #9
JaredAM commentedSubscribe and possible solution: http://drupal.org/node/26552
Comment #10
JaredAM commentedPlease see my patch here: http://drupal.org/node/26552#comment-3038376
Comment #11
Marvine commentedif you don't want to hack the core module, you can use hook_form_alter() in a module like :
Comment #12
mdupontDuplicate of #26552: Allow users with access to unpublished nodes to create unpublished books