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 administer nodes perm. to create unpublished books.

Files: 
CommentFileSizeAuthor
#5 drupal-book_cache_issue-1936908-5.patch1.77 KBjamiehollern
PASSED: [[SimpleTest]]: [MySQL] 63,085 pass(es).
[ View ]
#2 drupal-book_cache_issue-1936908-2.patch1.71 KBjamiehollern
FAILED: [[SimpleTest]]: [MySQL] 63,087 pass(es), 0 fail(s), and 43 exception(s).
[ View ]
book-outline-busted.png50.26 KBjenlampton

Comments

Assigned:Unassigned» jamiehollern
Issue summary:View changes

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

Status:Active» Needs review
StatusFileSize
new1.71 KB
FAILED: [[SimpleTest]]: [MySQL] 63,087 pass(es), 0 fail(s), and 43 exception(s).
[ View ]

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.

StatusFileSize
new1.77 KB
PASSED: [[SimpleTest]]: [MySQL] 63,085 pass(es).
[ View ]

Updated patch.

Status:Needs work» Needs review