I have been using DHTML Menu for a while without any issues, and recently I installed IMCE. I found that the IMCE File Browser is not working (no icons and no preview of image etc.) unless I disable DHTML Menu.
So, I wondered if the IMCE File Browser Navigation is being considered as if it is a Drupal menu, and DHTML Menu is trying to DHTML enable it.
I have configured DHTML Menu to enable only for Administrator menu and Navigation menu - this doesn't fix the issue.
I am using Firefox so I used Firebug and found the code where the error occurs.
In Firebug console I get:
$(".menu li").css("margin-left") is undefined
Then, it shows the line of code where the problem occurs. It is line 508 in the code segment shown below:
505 // When using LTR, all icons can be shifted as one, as the text width is not relevant.
506 if (settings.nav == 'bullet' && !rtl) {
507 // Shift overlay to the left by the width of the icon and the distance between icon and text.
508 var shift = '-' + (Math.ceil(($('.menu li').css('margin-left').replace('px', ''))) + 16) + 'px';
509 // Shift the overlay using a negative left-hand offset, and the text using a negative right-hand margin.
510 $('.dhtml-menu-icon').css('left', shift).css('margin-right', shift);
511 }
So, does this mean there is something wrong with CSS or is this a bug in DHTLM Menu ? I am trying to understand why DHTML Menu would be attempting to process the menu, which is actually part of IMCE File Browser. It also looks like this problem only occurs if I use 'bullet' mode in DHTML Menu settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | dhtml_menu-menu_check-1084152-1.patch | 499 bytes | Angry Dan |
Comments
Comment #1
TimAlsop commentedI reported this issue on IMCE issue queue, and somebody confirmed it is a bug in DHTML Menu. They even tested a fix by modifying the DHTML Menu code. Please see http://drupal.org/node/1093772.
The suggested fix is:
Can somebody confirm if the fix suggested is correct, or is there a better fix ?
Comment #2
Angry Dan commentedThis is not IMCE specific - it's because you don't have any standard Drupal menus on the page.
I've written a patch that should solve the issue by not running any of the behaviour if there are no menus on the page.
BTW I'm using Drupal 7, where this issue also applies.
Comment #3
Jorge Navarro commentedHaving the same problem with module filter. Patch #2 works like a charm! thank's
Comment #4
Jorge Navarro commented