Gmap breaks javascript in IE
| Project: | GMap Addons |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Gmap has been working fine for me in other installs but now I get a Javascript error. Of course this is ONLY in IE 6/7!
Seems to be working ok in 5.10 installs. I have since tried to "go back" to 5.10 in the installs where it's broken. I've uploaded the modules and .js files from working installs. I've tried other themes (it doesn't work under garland even)
Here is the error:
Line: 719
Char: 295
Error: Number expected
Code: 0
URL: http://xxxxx.com/node/30/edit
Drupal version 5.12, Gmap version 5.x-1.0-rc2
(Also tried Gmap 5.x-1.0-rc1 and 5.x-1.x-dev)
The error breaks all javascript on the page. If I turn off Gmap module, the javascript works.
This leads me to believe that something is broken in Gmap or conflicting with other javascript...?
(This may have to do with the Gmap addons module as well)
Please help, I am pulling hair out/banging head against wall! :-p

#1
I turned off the "GMap CCK Field" module and no longer see this error.
This is part of the Gmap Addons module, so I'll try to move the project this issue is associated with.
---
There's only one version of Gmap Addons so I'm not sure what the problem could be.
#2
For those with this same issue, here's a fix.
(Please don't bug me by saying you're breaking the code, because my site is not usable with Gmap with the way the code is! )
In the gmap_addons folder, look at the gmap_cck.module.
Comment out line 412:
$form = gmap_macro_builder_form($ndefs, $hide);
--
This appears to allow Gmap and Gmap addon module to function properly for me, yet not get a javascript error in IE 6/7.
Hope this helps someone at some point!
#3
Thanks jonahan,
I was pulling out my hair all day. Perfectly formatted pages under firefox lose several of their css file settings whenever a gmap appeared on the page when viewed under IE - a mess of missing colors fonts and layouts - a total disaster. When I saw that your fix works for the 6.x version of the code as well, and at this time the CCK field isn't working with 6.10 of drupal core anyway, i just deleted gmap_cck.module from my site.
Anyway, it took me hours to even localize the problem down to the gmap module, so I thank you for your tweak, you have saved me a ton of grief.
e.