$page was removed from hook_node_view(), but the book module still does:
function book_node_view($node, $teaser, $page) {
if (!$teaser) {
if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) {
$node->content['book_navigation'] = array(
'#markup' => theme('book_navigation', $node->book),
'#weight' => 100,
);
if ($page) {
menu_set_active_trail(book_build_active_trail($node->book));
menu_set_active_menu_name($node->book['menu_name']);
}
}
}
book_node_view_link($node, $teaser, $page);
}
I basically means that the book breadcrumbs are currently broken. We haven't seen that because they are not tested.
Comments
Comment #1
damien tournoud commentedThe good news is that now that we have multi-menu trail computation (thanks to the administrative menu patch) we don't need to do that into the book module anymore.
This patch comes with a full test suite for book breadcrumbs, and some code style fixes for book.test.
Comment #2
chx commentedCalling theme() from a parent Drupal and comparing it to a themed object in the child Drupal is not going to work.
Comment #3
chx commentedAlso note: very nice patch.
Comment #4
damien tournoud commentedFixed the test. chx, you made me write XPath again... ;(
Comment #5
damien tournoud commentedComment #7
damien tournoud commentedHum. I wasn't meaning to change the status.
Comment #8
webchickNow that is a nice clean-up. Way to make use of APIs in the removal of old, crufty code.
Committed to HEAD with a small doc clarification above all of those checkBookNode() calls which are obtuse to parse without reading the function signature.