The dhtml menu seems to prevent the media module's javascript to run.
when you install dhtml & media, none of the media module's javascript will run.

(in chrome there is also this bug : Uncaught TypeError: Cannot call method 'replace' of undefined )

Comments

yuriy.babenko’s picture

Experiencing the same issue without the media module. Latest 7.x version breaks all JS on the site with the same error as the OP.

yuriy.babenko’s picture

Title: dhtml menu & media module » DHML Menu JavaScript bug - attempting to call $.replace() on an undefined element
Status: Active » Needs review
StatusFileSize
new846 bytes

Fixed the bug on my local copy. Attaching patch for review.

pianomansam’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

This is a huge error that is corrected by the patch in #2. Please get this committed ASAP as it is breaking site' JS.

Rory’s picture

Alternatively you can apply the patch here which fixes this issue, and another.

vadym.kononenko’s picture

Patch from #2 solved my issue too (and patch from #4 is bad).

vadym.kononenko’s picture

StatusFileSize
new968 bytes

I've modified a little patch from #2.
It use size only from '.menu li.dhtml-folder' now that is more correct.

RStrydom’s picture

Issue summary: View changes

I came across the same error and all JavaScript on my site did not want to work. This only happened once I selected the "Expand on Bullet" navigation option. The patch from #6 has worked for me. (I did not test #2 as I preferred the more specific css selector)

dspcore’s picture

how to add these js patch for dhtml menu in drupal 7.x?

rooby’s picture

@dspcore:

If you are on command line linux/mac/etc. you can copy the patch in comment #6 into the dhtml_menu module directory, cd to it, then run patch -p < dhtml_menu-dhtml-folder.patch

For more thorough information on applying patches see https://www.drupal.org/patch/apply

benleivian’s picture

Thanks for the patches (I used #6).

vuil’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.02 KB

Re-roll the patch of #6 to the latest 7.x-1.x-dev branch, and assign the issue to that branch.

  • ilchovuchkov committed 81d16e4 on 7.x-1.x
    Issue #1129178 by ilchovuchkov: DHML Menu JavaScript bug - attempting to...
vuil’s picture

Status: Needs review » Fixed

Commit the issue and close it as Fixed. Thank you!

Status: Fixed » Closed (fixed)

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

vuil’s picture