I have a node that is assigned to a book hierarchy, but is unpublished.

If I navigate to the book node which is immediately after the unpublished node in the book hierarchy, a link to the unpublished node is displayed in the book navigation below the content.

For an example, go to http://nlca.com/recordings/general/treeofglory. There is an unpublished node following this node in the book hierarchy. If you click on the "Next - Heritage Series" link in the book navigation below the content, you'll see that a link to the unpublished node "Holy: A Hymn Festival" is now displayed with the "previous" link.

CommentFileSizeAuthor
#4 book.module.diff1.12 KBdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bjornarneson’s picture

I have more information about the book hierarchy which may help get to the bottom of this.

--Recordings
----General Interest
------Tree of Glory 
------Holy: A Hymn Festival (unpublished)
----Heritage Series
------Heritage I
------Heritage II
------Heritage III
------Heritage IV

In the book structure above, the "Previous" link in book navigation shows "Holy: A Hymn Festival" when on the "Heritage Series" page.

--About the National Lutheran Choir
----Director
----Ensemble
----Board of Directors
----Staff (unpublished)
----Founder

In the example above, the book navigation DOES respect the unpublished status of the "Staff" node.

As far as I can tell, the bug exists when the unpublished node is the last node in its level of the hierarchy and the user is viewing the next node in the book sequence, one level up.

bjornarneson’s picture

Version: 4.6.1 » 4.6.2

This is still a problem with Drupal 4.6.2. I've been able to reproduce this bug on two different installations. Does anyone else have problems with Drupal exposing unpublishing nodes through book.module?

drumm’s picture

Version: 4.6.2 »
Assigned: Unassigned » drumm

I'll take a look.

drumm’s picture

Status: Active » Needs review
FileSize
1.12 KB

Here is a patch. It probably applies to the 4.6.x branch too.

Dries’s picture

Status: Needs review » Fixed

Committed to DRUPAL-4-6 and HEAD.

Anonymous’s picture

drumm’s picture

Version: » 4.6.0
Status: Fixed » Closed (fixed)