"Navigation" appears as the top item in the DHTML navigation menu. It links to the home page. Yet this item does not appear within the normal menu structure for the Navigation menu. Is there a way to remove it? Or is this a bug?

I can't see any reason from the module code why it should be there. "Navigation" is the default term for the block header, but should not appear in the block menu itself.

Comments

alpinejag’s picture

This is happening to me too.

farf’s picture

Me too....

alpinejag’s picture

Anyone figure out why yet?

brmassa’s picture

Status: Active » Fixed

Guys,

i dont know about Arancaytar (the module maintainer), but i will not maintain the D5 code anymore.

Im sorry, but i dont have any D5 testing site to work on. Also, the module now uses some features only available for D6, like hook_preprocess.

again, sorry,

massa

Im marking it as Fixed, but anyone can and should reopen it if wanted.

ertomueller’s picture

same thing happening to me. interesting is that it didn't happen for almost 2 months. then all of a sudden it started happening about 2 days ago. using drupal 5. does anybody got the issue resolved?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

fukamit’s picture

Status: Closed (fixed) » Needs review

I also encountered the problem.
It occurs when the 'Duplicated menu items:' field contains a blank line.
A patch below worked for me.

--- dhtml_menu/dhtml_menu.module.orig 2007-11-29 06:12:57.000000000 +0900
+++ dhtml_menu/dhtml_menu.module      2008-05-28 19:08:36.000000000 +0900
@@ -96,2 +96,2 @@
   $text = variable_get('dhtml_menu_duplicated', 'admin');
-  $text = explode("\n", $text);
+  $text = explode("\n", trim($text));

The patch won't work if you remove all lines in the field.
In the case, you can suppress the unwanted item by entering something
that already exists in the menu, such as logout.

cburschka’s picture

Ouch. You can't split a string and then check if the array is empty - the array will always have at least one element even for empty strings. An array with a single empty string element evaluates to true. So the whole if ($text) never quite worked. I've fixed it by moving the string splitting inside the block, so it checks for empty strings first.

I'll check the 6.x branch to see if there is any similar problem - after all, the default value for that field isn't empty, so an empty string is a special case.

cburschka’s picture

What's happening? I'm sure I uploaded a file. Here we go again.

cburschka’s picture

StatusFileSize
new833 bytes

Whatever.

Index: dhtml_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/dhtml_menu/dhtml_menu.module,v
retrieving revision 1.6.2.14
diff -u -p -r1.6.2.14 dhtml_menu.module
--- dhtml_menu.module	28 Nov 2007 21:12:57 -0000	1.6.2.14
+++ dhtml_menu.module	8 Jun 2008 21:17:51 -0000
@@ -93,10 +93,10 @@ function _dhtml_get_add_links() {
   if ($dhtml_menu_duplicated) return $dhtml_menu_duplicated;
 
   $dhtml_menu_duplicated = array();
-  $text = variable_get('dhtml_menu_duplicated', 'admin');
-  $text = explode("\n", $text);
+  $text = trim(variable_get('dhtml_menu_duplicated', 'admin'));
 
   if ($text) {
+    $text = explode("\n", $text);
     foreach ($text as $line) {
       $line = trim($line);
       preg_match('/^([^ ]+)( (.*))?$/', $line, $match);
cburschka’s picture

Status: Needs review » Fixed

Ouch. The whole thing was fixed in the development branch the whole time. And so where numerous other fixes that have been done four months ago - 5.x-1.2 is half a year old. I'll freeze that into a final D5 version and off we go.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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