Module is installed and enabled. I go to Site building > Blocks > Navigation > Left sidebar > configure, enable "Use the DHTML effect", and then click the "Save block" button. But the menu behavior is unchanged, i.e., no DHTML effect. I log out and log back in, but no change. I go back into configure, and the checkbox is no longer checked. Why isn't my request to use the effect being saved? I'm logged in as the administrator, so I should have full permissions.

Any assistance would be most appreciated.

CommentFileSizeAuthor
#41 screenshot.jpg164.68 KBfiockthis
#39 administer.gif142.81 KBfiockthis
#28 Drupal Blocks.png53.25 KBAnonymous (not verified)

Comments

dajul’s picture

Same issue here. Create content and Administer page works fine, but there are no DHTML: blocks as before.

Drupal 6.2
DHTML Menus 6.x-1.05
Pathauto 6.x-1.x-dev
Taxonomy Menu 6.x-1.0
Token 6.x-1.10
Token actions 6.x-1.10

anthonyp’s picture

Yes, same behavior here
Drupal 6.2
DHTML Menus 6.x-1.05

gringorick’s picture

Same here.

Drupal 6.2
DHTML Menus 6.x-1.05

brmassa’s picture

Assigned: Unassigned » brmassa

Guys,

i will take a look on this.

regards,

massa

LindenLion’s picture

Same here with DHTML version 6.x-2.0

FAF’s picture

Status?

Same problem here with D6.2 and DHTML 6.*-2.0.

silurius’s picture

Subscribing (same issue here).

cburschka’s picture

Version: 6.x-1.05 » 6.x-2.x-dev
Assigned: brmassa » cburschka

I will recreate a test site from scratch and try to duplicate this problem.

cburschka’s picture

Priority: Normal » Critical

Problem identified. The checkbox is indeed without effect. The tricky part here is that on a fresh installation, the effect is added by default automatically. So I can't switch it off.

You upgraded an old site, presumably?

I'll have a patch ready in a bit.

cburschka’s picture

Priority: Critical » Normal

Problem analyzed further. There is a red herring here, which is that the checkbox does not display changes. That is because the checkbox loads its state from a variable that has a typo in it. The checkbox therefore always shows up as empty.

This should have no effect on what value is actually saved, however. I've fixed the problem I described, but it stands to reason your problem is not yet wholly fixed. Please download the new version and repeat.

cburschka’s picture

Status: Active » Needs review

This patch fixes the typo.

cburschka’s picture

I know it sometimes works. I'll just keep posting comments until the upload gets through.

cburschka’s picture

Oh BOTHER.

Here's the code of the patch.

Index: dhtml_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/dhtml_menu/dhtml_menu.module,v
retrieving revision 1.25
diff -u -p -r1.25 dhtml_menu.module
--- dhtml_menu.module   12 May 2008 06:39:52 -0000      1.25
+++ dhtml_menu.module   20 Jun 2008 01:18:31 -0000
@@ -33,7 +33,7 @@ function dhtml_menu_form_block_admin_con
   // Modify the form if it is a menu or the navigation block.
   if ($form['module']['#value'] == 'menu' || ($form['module']['#value'] == 'user' && $form['delta']['#value'] == 1)) {
     $delta = $form['module']['#value'] == 'user' ? 'navigation' : $form['delta']['#value'];
-    $dhtml_menus = variable_get('dhtml_menus_menus', array());
+    $dhtml_menus = variable_get('dhtml_menu_menus', array());
     $form['dhtml_menu'] = array(
       '#default_value'  => !empty($dhtml_menus[$delta]),
       '#title'          => t('Use the DHTML effect'),
cburschka’s picture

Status: Needs review » Fixed

Committed.

Please update your version from CVS or patch it with the code above, and then try to reproduce the problem I still can't duplicate. If this issue gets closed without more problems in two weeks, I'll release the new version as bug-free.

silurius’s picture

Problem identified. The checkbox is indeed without effect. The tricky part here is that on a fresh installation, the effect is added by default automatically. So I can't switch it off.

You upgraded an old site, presumably?

I'll have a patch ready in a bit.

For me, on a brand new (never upgraded) 6.2 site, using a brand new instance of DHTML Menu, the effect was added by default as you say. At some point it seemed to somehow turn itself off.

I manually edited dhtml_menu.module, fixed the typo, replaced the file on the site and ran update.php just in case. The effect is still disabled despite the checked/unchecked state in settings.

silurius’s picture

Status: Fixed » Active

Setting to active since it still appears to be broken.

cburschka’s picture

The "seeming to turn itself off" might have happened if you ever saved the block settings for that block. The bug I fixed would have unchecked the checkbox when the form was loaded, so if you saved without manually re-checking it, the effect would have been turned off.

The effect is still disabled despite the checked/unchecked state in settings.

I am assuming that the checkbox will now show up as checked if you load the settings form, but the DHTML effect is still missing. Is this correct?

cburschka’s picture

Debugging help: Since I can't reproduce it and you're comfortable with editing the code manually, could you add some debugging output to the function dhtml_menu_preprocess_block in your site? Just dump the $dhtml_menus system variable:

  }

  $dhtml_menus = variable_get('dhtml_menu_menus', array());
  var_dump($dhtml_menus); // debug

  // If the menu has the DHTML menu option enabled,

I'm not sure if your problem is that the preprocessing function is not called at all, or that the variable is somehow not set. Since your checkbox is checked, it should be the former. Perhaps try emptying the {cache_block} table...

mikeormerod’s picture

I see the same issue on a brand new installation of 6.2 and DHTML_menu-6.x-2.0

cburschka’s picture

That didn't add much. There is a known bug in 6.x-2.0 that got fixed since then.

What is interesting is whether you still see the bug in 6.x-2.x-dev. If it's gone, the bugfree version will be released as 6.x-2.1, but I'm not releasing a bugfix as official before I know it actually fixes the bug.

----

I have tried again to reproduce the bug described by silurius in #16, and have failed. I am using a completely new installation of CVS DRUPAL-6 with the CVS HEAD of dhtml_menu enabled, and nothing else. It works without an issue.

FAF’s picture

The checkbox is checked here on D6.2 with the latest CVS HEAD of dhtml_menu enabled (23 June 08).

For my part, the issue is fixed. Didn't test it further though, but so good so far.

I'm using a clean D6.2 install.

Thx for the bugfix.

/FAF

cburschka’s picture

Status: Active » Fixed

For my part, the issue is fixed. Didn't test it further though, but so good so far.

I'm assuming that you tested at least enough to know whether the menus actually opened or closed, since it's hard to miss that. In that case, fixed.

silurius’s picture

Status: Fixed » Active

Debugging help: Since I can't reproduce it and you're comfortable with editing the code manually, could you add some debugging output to the function dhtml_menu_preprocess_block in your site? Just dump the $dhtml_menus system variable:

  }

  $dhtml_menus = variable_get('dhtml_menu_menus', array());
  var_dump($dhtml_menus); // debug

  // If the menu has the DHTML menu option enabled,

I'm not sure if your problem is that the preprocessing function is not called at all, or that the variable is somehow not set. Since your checkbox is checked, it should be the former. Perhaps try emptying the {cache_block} table...

Arancaytar, thanks for the debugging info. Here is the result of adding the dump line above to that section of code (appeared in my header after editing the file and refreshing a page):

array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } array(3) { ["navigation"]=>  int(0) ["primary-links"]=>  int(1) ["secondary-links"]=>  int(1) } 

Prior to the above debugging, I had just downloaded the latest dev (June 23), upgraded the module with it and then visited the DHTML admin page. I unchecked, saved, rechecked and saved again. No change to the behavior. Oh and I just verified that the cache_block table is already empty.

Incidentally, I wonder if my drupal 6.2 revision is up-to-date, since that has come up recently in this issue since my last post. All I know is I downloaded 6.2 from one of the main pages on June 10.

cburschka’s picture

Status: Active » Postponed (maintainer needs more info)

The debug output shows that DHTML is disabled for Navigation, but enabled for the other two menus.

Prior to the above debugging, I had just downloaded the latest dev (June 23), upgraded the module with it and then visited the DHTML admin page. I unchecked, saved, rechecked and saved again. No change to the behavior.

By "DHTML admin page", surely you mean "admin/build/blocks/configure/user/1", which is the configuration page for the Navigation block, which is the place where you enable or disable DHTML behavior for that block? The settings page at "admin/settings/dhtml_menu" merely allows you to enable and disable a variety of special Javascript effects that have no effect on which menus actually use the functionality.

silurius’s picture

Status: Fixed » Postponed (maintainer needs more info)

Ah, I totally missed that the effect is enabled on a per-block basis now in 6.x, and was further confused by the fact that the behavior seemed to be enabled by default and then became disabled for reasons unknown. I had been checking admin/settings/dhtml_menu only, and until now had merely scanned the readme. Sorry to have wasted your time, Arancaytar. Thanks for clearing that up for me.

silurius’s picture

Status: Postponed (maintainer needs more info) » Fixed
cburschka’s picture

Status: Postponed (maintainer needs more info) » Fixed

Not at all! Thank you for your usability report. In response to this, I have already added a setting to that page (#276775: Global enable/disable switch for DHTML Menus) that will actually switch it on globally, as you and most people would expect. :)

Anonymous’s picture

Assigned: cburschka » Unassigned
StatusFileSize
new53.25 KB

I am new to Drupal, however I have literally spent days and hours trying to learn Drupal from the book "Building powerful and robust websites with Drupal 6". When get to chapter 3, it tells me about DHTML. I downloaded DHTMLv2.1 and enabled it. As instructed by the above mentioned book, I am supposed to see the disabled DHTML Navigation, Primary Links and Secondary Links in the Blocks section of Site Building. These are not showing up.

Can someone help me? Explanation in layman's terms would be appreciated. I am 60 year old guy trying to learn Drupal without any formal experience in HTML PHP etc. I am just learning

Thanks

cburschka’s picture

Assigned: Unassigned » cburschka

Sorry, but Drupal books are perpetually in danger of becoming outdated. DHTML Menu is a contributed module, which means it is changed faster than core.

You will need to enter the configuration settings for the normal Navigation block and activate the checkbox for DHTML functionality. :)

Anonymous’s picture

Thanks for your quick response.

What you are trying to say forget the book re this issue, just enable DHTML by clicking the DHTML box in the module section?

I still have to follow the book cause I am trying to learn Drupal. I have to re-build my wife's website.

Have a good day

:)

cburschka’s picture

If you're installing the module for the first time, it should do everything automatically.

If you've upgraded from an old Drupal 5 site, you may need to actually enter the block settings for the Navigation block and check the checkbox manually.

fiockthis’s picture

I am having the same problem as ahoodnick.

This is not an upgraded site.

I just downloaded Drupal 6.2 yesterday, and am using the same book as ahoodnick.

I downloaded the DHTML Menu module. I enabled it in modules, but the DHTML Navigation, the DHTML Primary links and the DHTML Secondary links are not showing up in the Blocks section. Just like in the screenshot provided by adhoodnick.

I entered the configure for the Navigation block, the Primary link block and the Secondary link block, and "Use the DHTML effect" is checked. Yet still no DHTML.

Any ideas?

fiockthis’s picture

Status: Fixed » Active

Definitely a bug.

Check this: http://drupal.org/node/279321#comment-911766

cburschka’s picture

Status: Active » Postponed (maintainer needs more info)

- What precise version of the module are you using? If you are downloading from CVS, which branch?
- Open the page source and search for a script tag that includes the Javascript file dhtml_menu.js. Is it there?

fiockthis’s picture

I downloaded this: http://drupal.org/node/279854 from Drupal.org

And yes, I see the file dhtml_menu.js

cburschka’s picture

And in admin/build/block/configure/user/1, you see a checkbox saying "Use DHTML Behavior", which is checked? And yet the navigation block does not have DHTML functionality, either opening collapsed items or closing items that were loaded as open?

fiockthis’s picture

I don' know what you mean.

But yes, there is a checkbox next to "Use the DHTML effect", and it is checked. And this is in the Configure menu for Navigation in:
Administer/Site Building/Blocks/Navigation - Configure

cburschka’s picture

This is increasingly confusing.

- Could you test it with other browsers?
- What precisely happens when you click on a menu item that should expand, such as "Administer"?
- Please open the page source on the main page, search for the "Administer" link and paste the surrounding HTML code here. It's still not clear whether this is a server or a Javascript problem.

fiockthis’s picture

StatusFileSize
new142.81 KB

I've tried it both in Firefox and IE.

When the "Use the DHTML effect" box is checked, and I click on a menu such as Administer.. the menu opens up, but a page does not load. If I double click it, the page loads.

When the "Use the DHTML effect" box is not checked, and I click on a menu such as Administer.. the menu opens up, and the page loads.

Have you checked these posts: http://drupal.org/node/279321#comment-911766 ? I guess the -dev version fixes the problem, but I haven't downloaded the -dev version, because I'm new and don't wanna mess up my site.

I hope I uploaded what you need.

cburschka’s picture

Title: Enabling DHTML effect not being saved » Menus expand even when DHTML effect is disabled.
Status: Postponed (maintainer needs more info) » Active

When the "Use the DHTML effect" box is checked, and I click on a menu such as Administer.. the menu opens up, but a page does not load. If I double click it, the page loads.

So far, all is as it should be.

When the "Use the DHTML effect" box is not checked, and I click on a menu such as Administer.. the menu opens up, and the page loads.

That is surprising. No Javascript effects are supposed to happen, since they are switched off for that block. I will see if I can reproduce this bug. Meanwhile, I'm relieved that at least this is a relatively minor bug as it does not impact functionality.

fiockthis’s picture

StatusFileSize
new164.68 KB

It definitely impacts functionality.

The DHTML Menus do not show up in Blocks. That is the problem.

A screenshot is included of the Blocks section.

No DHTML menus are visible.

cburschka’s picture

Status: Active » Closed (works as designed)

Sorry, but are you serious?

- It has been explained in this issue and on the forum that "DHTML Blocks" have not existed since version 6.x-1.04, and that the module works with the normal Navigation block.
- You have just said yourself that the module is in fact working as it should be on your site, as shown by the fact that the menu expands when you click it!

What more do you want? :)

fiockthis’s picture

"..'DHTML Blocks' have not existed since version 6.x-1.04, and that the module works with the normal Navigation block."

Sorry, never read this.

This is my first time using Drupal, and I've been following the book: "Building powerful and robust websites with Drupal 6", and they use an older version of this module.