I have added 5 book pages into my book, each node has a parent book node referenced in it's book settings. On admin/content/book/N (where you go to re-order the book pages) there are only three items in the list, in spite of there being five nodes in the book.

To reproduce:
1) create three book nodes, in succession, placing each into the book using the fields on the node.
2) navigate to the book_admin_edit page and save an order.
3) create some more book nodes, placing each into the book using the fields on the node.
4) navigate to the book_admin_edit page again. You'll notice your new book nodes are missing.

may or may not be related to #26552: Allow users with access to unpublished nodes to create unpublished books

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamiehollern’s picture

Assigned: Unassigned » jamiehollern
Issue summary: View changes

Looking at this during the code sprint (25th January 2014).

jamiehollern’s picture

Status: Active » Needs review
FileSize
1.71 KB

This was an issue with an out of date cache. The book admin page data is saved as a menu and utilises the menu cache once the admin page is viewed for the first time. Clearing the menu cache fixes this issue, however this cache was not refreshed/deleted when a book node was created/updated/deleted*. The patch I've added deletes the cache when a node is added/updated/deleted.

* When a node was deleted it appeared to update, however this was simply cosmetic as the node no longer existed. The menu item still existed in the menu cache entry.

Edit to say thanks to Paul Linney for his help with this issue.

Status: Needs review » Needs work

The last submitted patch, 2: drupal-book_cache_issue-1936908-2.patch, failed testing.

The last submitted patch, 2: drupal-book_cache_issue-1936908-2.patch, failed testing.

jamiehollern’s picture

Updated patch.

jamiehollern’s picture

Status: Needs work » Needs review
jhedstrom’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Needs a reroll, and there are trailing whitespace issues in the patch above.

Sivaji_Ganesh_Jojodae’s picture

Assigned: jamiehollern » Sivaji_Ganesh_Jojodae
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.76 KB

Straight re-roll of patch #5.

Status: Needs review » Needs work

The last submitted patch, 8: drupal-book_cache_issue-1936908-8.patch, failed testing.

mgifford’s picture

Assigned: Sivaji_Ganesh_Jojodae » Unassigned

Just unassigning so someone else can take this on.

jamiehollern’s picture

Status: Needs work » Closed (cannot reproduce)

I can no longer reproduce this bug.