Great theme! For aesthetically challenged devs, Bootstrap is bootiful. The Bootswatch integration is neat. Chocolatey kudos.

The book nav ToC widget was showing errors like this:

Notice: Trying to get property of non-object in node_page_title() (line 2206 of D:\xampp\htdocs\cybercourse\modules\node\node.module).

But only for some pages. Other pages in the same book were OK.

I disabled bootstrap_process_book_navigation using hook_theme_registry_alter, and the problem went away. So did the nifty widget, of course. :-(

Note that this project has much messing-about-with-books code, so it may not be a problem with bootstrap_process_book_navigation at all. I can't say for sure.

Comments

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#1697570: _menu_load_objects() is not always called when building menu trees

I am very tempted to say this isn't even related to the theme. The "book" module integration in this project only themes the menu output. It has nothing to do with the node itself. The error you are getting sounds like the title property is not set on the $node object.

Regardless, this sounds more like either an issue with core (related issue I am linking) or possibly even a corrupted node entry in the DB, neither of which are really an issue of this project.

I am marking this as "Postponed (maintainer needs more info)" for now. If the patch in the related issue fixes your issue, please mark this as "Closed (works as designed)".

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Scripted response: This issue has been closed while cleaning up the issue queue.

guy_schneerson’s picture

Looks like this may be a long outstanding core issue https://www.drupal.org/node/1697570

The bit that explains why this may be an issue on bootstrap

this issue on D7 and I see it only occurring when _menu_link_translate() is called twice on the same menu link item that points to a node. This occurs when building the same menu tree more than once with menu_build_tree() because it uses statically cached menu trees from _menu_build_tree().

As menu_build_tree is called from the theme (see below) this is triggering this issue

<?php
function _bootstrap_book_children($book_link) {
  // Rebuild entire menu tree for the book.
  $tree = menu_build_tree($book_link['menu_name']);
  $tree = menu_tree_output($tree);

  // Fix the theme hook suggestions.
  _bootstrap_book_fix_theme_hooks($book_link['nid'], $tree);

  // Return the rendered output.
  return drupal_render($tree);
}
?>