If I create content that has been set to "Auto create book main page" under its corresponding content type settings, but don't set to "Publish" under Publishing Options, it won't create a new book. Subsequently, if I set the node to "Publish" it will place the node under another, existing book.

I'm not sure if this is by design or enforced by the book module. I am also using the "Outline Designer" module.

CommentFileSizeAuthor
#2 BookMadeSimple.zip21.45 KBMarcElbichon

Comments

MarcElbichon’s picture

There's a problemn with core book module. This module doesn't show unpublished nodes in book outline parent list.
So, when modify unpublished book, parent is set to the first item of the list because node is not in the list.
You can post an issue to book core module or modify line in the book_get_books() function in book.module file :

$result2 = db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (". implode(',', $nids) .") AND n.status = 1 ORDER BY ml.weight, ml.link_title"));

by

$result2 = db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (". implode(',', $nids) .")  ORDER BY ml.weight, ml.link_title"));

BMS hide links in view mode for unpublished node. I can add a new setting to correct it.

MarcElbichon’s picture

StatusFileSize
new21.45 KB

I've modified module to correct core book module bug.
Can you test this version ?

MarcElbichon’s picture

Status: Active » Closed (fixed)
jun’s picture

Status: Closed (fixed) » Needs work

Hi, sorry to report this bug is still in 3.2.

MarcElbichon’s picture

Status: Needs work » Closed (fixed)

Commited in 6.x-3.3 version

scottrigby’s picture

Project: Book made simple (Obsolete) » Book made simple
Version: 6.x-3.1 » 6.x-3.x-dev