custom_breadcrumbs_identifiers.module returns an array for the breadcrumb in the book trail when is being used, but since the trail is empty, the returned array is empty.

custom_breadcrumbs.module in line 395 loops trough the items array, but breaks when the array is empty.

A working solution is checking if the array is empty:

  // Use the returned items to set the trail.
  foreach ($items as $item) {
    if(!empty($item)) {
	if ($item['crumb']) {
      $trail[] = $item['crumb'];
    }
    if (variable_get('custom_breadcrumbs_force_active_trail', FALSE)) {
      $locations[] = array(
        'title' => $item['title'],
        'href' => drupal_get_normal_path(trim($item['href'])),
      );
    }
	}
  }

Comments

dafeder’s picture

Status: Active » Needs review
StatusFileSize
new964 bytes

Worked for me too. Here's a patch.

  • lamp5 committed 4a87e23 on 7.x-2.x
    Issue #1280980 by dafeder: book-hierarchy identifier breaks when a book...
lamp5’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.