Closed (fixed)
Project:
Submenu Tree
Version:
5.x-0.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Apr 2008 at 01:28 UTC
Updated:
10 Jun 2008 at 11:54 UTC
Titles Only view has a bug the theme_submenu_tree_titles function. It doesn't output links to pages. For example, if you have a page: /node/25, it will only output: /node - completely missing the: /25
On line 408 it has this line: $list[] = l($item['node']->title, 'node/' . $child->nid);
This is calling $child->nid. There is no reference to $child within this function. I was able to resolve the issue by placing this directly above the call: $child = $item['node'];
Now, the function looks like this:
function theme_submenu_tree_titles($items, $title = null) {
$list = array();
foreach ($items as $item) {
$child = $item['node']; // bug fix
$list[] = l($item['node']->title, 'node/' . $child->nid);
}
return theme('item_list', $list, $title);
}
Comments
Comment #1
bengtan commentedHi,
Thanks for this. I've commited a fix onto the Drupal-5 branch.
It's a slightly different fix from yours, but both will work all the same.
Comment #2
bengtan commentedComment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.