Posted by seutje on November 3, 2009 at 1:59pm
Jump to:
| Project: | GMap Module |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
some1 on IRC was getting the 'jQuery is undefined' error caused by this mess:
<?php
$o .= '<script type="text/javascript">'."\n";
$o .= "/* <![CDATA[ */\n";
$o .= 'jQuery.extend(true, Drupal, { settings: '. drupal_to_js(array('gmap' => array($element['#map'] => $map))) ." });\n";
$o .= "/* ]]> */\n";
$o .= "</script>\n";
?>this is not how we add js
attached patch tries to fix that by wrapping it in (function($){ ... })(jQuery) and adding it with a drupal_add_js() with inline as second argument and should apply to current HEAD
| Attachment | Size |
|---|---|
| gmap.patch | 886 bytes |
Comments
#1
Yeah, thanks, it was me1 :)
#2
every friggin time I forget status -_-
#3
+1, I was bit by this bug also. The patch did the trick!
#4
Isn't this a dupe of #286653: Patch to use JS Aggregation or JS at the bottom of the page?
#5
o wow, how did I not find that?
this patch is a lot cleaner than mine aswel, what was I thinking? :x