Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
DHTML Menu seems to work fine when accessing a page directly in the front-end or back-end themes, but if the D7 core Overlay module is enabled and an admin screen is opened in the overlay lightbox, the following JS error is reported:
TypeError: Result of expression '$('.menu li').css('margin-left')' [undefined] is not an object.
This causes JS functionality to break in the admin screens, making collapsible fieldsets inoperable among others.
Comment | File | Size | Author |
---|---|---|---|
#16 | 1130250-16.patch | 913 bytes | vuil |
#14 | dhtml_menu_typeerror_fix-1130250.patch | 879 bytes | mxr576 |
#3 | js_error_admin_overlay_1130250_3.patch | 1.04 KB | baldwinlouie |
Comments
Comment #1
scott.whittaker CreditAttribution: scott.whittaker commentedJust to give more information, the error occurs at line 179 of dhtml_menu.js:
Comment #2
baldwinlouie CreditAttribution: baldwinlouie commentedI am seeing the same behavior in D7
Comment #3
baldwinlouie CreditAttribution: baldwinlouie commentedI am not sure this fixes the underlying problem. But this patch does a hasClass() check on the "margin-left" attribute. Once applied, it fixes my overlay problems.
Comment #4
marcoka CreditAttribution: marcoka commented# thanks, its seems also to fix these problems
http://drupal.org/node/1158784
Comment #5
drasgardian CreditAttribution: drasgardian commentedthanks, #3 fixed it for me too
Comment #6
michaelfavia CreditAttribution: michaelfavia commentedThis issue is causing a number of issues in downstream modules because it stops execution of JS (wysiwyg, media, etc).
Applied the patch to master branch and it fixes the issue. Not sure if the module should be loaded in this context or what the "actual" problem is but this helps alot of other project with erroneous reports. Please consider committing or telling us what should be happening and ill happily roll another patch.
I noticed the last commit on this module was 27 weeks ago. if you have other priorities and would like some help committing trivial stuff like this id be willing to comaintain for smaller issues like this.
Thanks. -mf
Comment #7
scor CreditAttribution: scor commentedMarked #1312692: Certain settings break color module and admin collapsing fields and #1158784: Js Problems as duplicate. The patch in #1 solves the issue for me as well. Given the amount of people who successfully tested this patch, I'm going to RTBC this.
Comment #8
KoCo CreditAttribution: KoCo commenteddid work for me.
Comment #9
michaelfavia CreditAttribution: michaelfavia commentedCommitted to master thank you.
http://drupalcode.org/project/dhtml_menu.git/commit/d1ad7e8
Comment #10
Summit CreditAttribution: Summit commentedYep, latest version showed the submenu's in Bartik again! Thanks!
EDIT: But wit option: Expand on Bullet: All links will continue to function as static links. To expand an item, click the bullet icon next to the link.
Is not working anymore...
Thanks for going into this more.
Greetings, Martijn
Comment #12
dspcore CreditAttribution: dspcore commentedto #3.
how to use this patch?
where should I add this?
Thanks for help.
Comment #13
DrupalHelpsMePowerNap CreditAttribution: DrupalHelpsMePowerNap commentedWithout too much testing, #3 solved my issues with running DHTML Menu + Overlay.
Comment #14
mxr576#3 did not work, but the following patch solved my problem.
Comment #15
vuilComment #16
vuilReroll the patch of #14.
Comment #18
vuilCommitted to the latest
7.x-1.x-dev
branch.Comment #20
vuil