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

Files: 
CommentFileSizeAuthor
#8 drupal-book_cache_issue-1936908-8.patch1.76 KBsivaji@knackforge.com
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 80,961 pass(es), 6 fail(s), and 10 exception(s).
[ View ]
#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

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
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.

jamiehollern’s picture

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

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@knackforge.com’s picture

Assigned:jamiehollern» sivaji@knackforge.com
Status:Needs work» Needs review
Issue tags:-Needs reroll
StatusFileSize
new1.76 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 80,961 pass(es), 6 fail(s), and 10 exception(s).
[ View ]

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@knackforge.com» Unassigned

Just unassigning so someone else can take this on.