Drupal-6 install.
This is kinda' a weird one. We had no problems (no pun indended :^) when running on Drupal-6-9. When I updated to the Drupal-6 (currently at 6.11-dev), I started getting errors whenever I visited a page that had no menu entry. It was this line from the noprob_navigation_links_level() function in template.php:
$item_page = $tree_page[$key];
Was getting a warning that the requested key didn't exist in the array.

Couldn't figure out how to suppress that error message, so I modified the template.php file around it. The diffs are below. I'm not sure if this is a bug in the theme or a new permissiveness in Drupal error reporting. ??

$ diff template.php.bak template.php
53c53,55
< $item_page = $tree_page[$key];
---
> if (!array_key_exists($key, $tree_page)) {
> $item_page = $tree_page[$key];
> }
60c62
< if ($item_page['link']['in_active_trail']) {
---
> if ($item_page && $item_page['link']['in_active_trail']) {
64c66,71
< $l['children'] = noprob_navigation_links_level($item_page['below'], $item_all['below']);
---
> if ($item_page) {
> $hold_item_page = $item_page;
> } else {
> $hold_item_page = array();
> }
> $l['children'] = noprob_navigation_links_level($hold_item_page['below'], $item_all['below']);

Comments

toddgee’s picture

Actually, the diff I originally posted on this issue was posted prematurely. I was still getting errors. I have posted new ones here. Note, however, that these too might be incomplete -- I think some higher power has been messing with the PHP error reporting level on my host so these diffs may lead to an incomplete solution.

YMMV,
todd

$ diff template.php.bak template.php
53,55c53
< if (array_key_exists($key, $tree_page)) {
< $item_page = $tree_page[$key];
< }
---
> $item_page = $tree_page[$key];
62c60
< if (isset($item_page) && $item_page['link']['in_active_trail']) {
---
> if ($item_page['link']['in_active_trail']) {
66,71c64
< if (isset($item_page)) {
< $item_page_below = $item_page['below'];
< } else {
< $item_page_below = array();
< }
< $l['children'] = noprob_navigation_links_level($item_page_below, $item_all['below']);
---
> $l['children'] = noprob_navigation_links_level($item_page['below'], $item_all['below']);