Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When creating a new book page, the option is selected. When you save the draft, no new book is created, and instead the page is added to an already existing book.
It works properly if you save the page as "Published" the first time instead of a draft.
Comments
Comment #1
sheise CreditAttribution: sheise commentedIt does actually create the new book.
The problem is that when you then edit the node, the book options only show published nodes, so it won't list itself and defaults to a different book, and saving it then makes it a page in that book.
I'm not sure what the best way around this is though.
Comment #2
mikebell_ CreditAttribution: mikebell_ commentedSimply commenting out line 383 in book.module fixes this but obviously that's not a nice solution.
A switch could be added to book_get_book which sets whether
$query->condition('n.status', 1);
gets added to the query.Comment #3
margyly CreditAttribution: margyly commentedAny progress on this?