Closed (works as designed)
Project:
Zentropy
Version:
7.x-2.0-rc5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2012 at 07:16 UTC
Updated:
26 Jan 2013 at 00:52 UTC
Hi
Drupal started throwing up an error as in the title:
Notice: Undefined index: title in zentropy_links() (line 891 of /var/www/dev/cccj/sites/all/themes/zentropy/template.php).
I found the line in the template which is trying to find a title key whilst going over menu items, and looks like it can't find the key.
I just did something below, to check if the key exists and if not add nothing which made the error go away.
Perhaps you'll be able to put in something better written to accomodate this issue.
$custom_class = "";
if (isset($link['title'])) {
$custom_class = drupal_html_class($link['title']);
}
// Add extra class to menu items.
//$custom_class = drupal_html_class($link['title']);
$class[] = $custom_class;
$output .= '<li' . drupal_attributes(array('class' => $class)) . '>';
Comments
Comment #1
creaoy commentedIt is strange behavior when $link array doesn't have title index.
I guess somewhere in code you have something like unset($link['title']);
Comment #2
creaoy commentedIt is strange behavior when $link array doesn't have title index.
I guess somewhere in code you have something like unset($link['title']);
Comment #3
davidneedhamIndeed, seems to me like this is something in your own code as suggested by @creaoy.
Comment #3.0
davidneedhamWrong line number in content as I had changed the original code.