Closed (duplicate)
Project:
GMap Module
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2009 at 13:59 UTC
Updated:
10 Dec 2009 at 18:02 UTC
some1 on IRC was getting the 'jQuery is undefined' error caused by this mess:
$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
| Comment | File | Size | Author |
|---|---|---|---|
| gmap.patch | 886 bytes | seutje |
Comments
Comment #1
OnkelTem commentedYeah, thanks, it was me1 :)
Comment #2
seutje commentedevery friggin time I forget status -_-
Comment #3
James Andres commented+1, I was bit by this bug also. The patch did the trick!
Comment #4
bdragon commentedIsn't this a dupe of #286653: Patch to use JS Aggregation or JS at the bottom of the page?
Comment #5
seutje commentedo wow, how did I not find that?
this patch is a lot cleaner than mine aswel, what was I thinking? :x