The problem is that book_get_books() keeps a static variable of all books. So the first time it's called, it works as expected, but then subsequent calls in the same request can fail because the newly-created book doesn't exist in the cache. This patch adds a reset parameter to book_get_books().

This issue was brought up in book_get_books() cache becomes stale when batch-inserting book pages, but was only addressed for D7 and D8. This is still a problem for D6.

CommentFileSizeAuthor
book_get_books_cache.patch680 bytesmark.lindsey

Comments

mark.lindsey’s picture

Bump. Is this something that will be addressed?

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.