I just noticed that pages with gmaps that are working fine in Firefox and Safari have a blown layout in IE7. In the pages affected, I'm using the gmap_simple_map function in a node template to render the map. You can see an example of the problem here:
http://www.utahnordic.com/skiing/locations/xtest
The basic set-up is Drupal 6.9 with LiteJazz 1.7 and suckerfish menus. I just embedded gallery2 yesterday and while investigating a similar problem today on the embedded gallery page, I realized that all pages with gmaps had the same problem (i.e. suckerfish menus and overall layout corrupted).
I've got no real experience troubleshooting this sort of problem so any ideas or advice is appreciated!
Comments
Comment #1
bdragon CreditAttribution: bdragon commentedWell, it seems to be something in gmap.css. Hmm..
Comment #2
bdragon CreditAttribution: bdragon commentedHmm, or maybe not. It worked once, then stopped working. (I only have IE6 handy...)
Comment #3
dave bruns CreditAttribution: dave bruns commentedAny ideas on how I should troubleshoot? I spent some time yesterday pulling apart the HTML source to see if I could pinpoint the problematic CSS file or script, but I could never get the page to build correctly no matter what I removed. This made me think that there is some sort of script problem -- perhaps an error condition that happens as the page loads initially. I only have IE 7, so that's what I'm testing with.
Comment #4
dave bruns CreditAttribution: dave bruns commentedUpdate - I finally did trace the problem to the gmap.css stylesheet. Troubleshooting further is harder than I would think, partly because IE seems to want to cache the css files, making it hard to test changes to gmap.css.
For now, I've simply disabled gmap.css by renaming the file on the server. I'm only using maps in a few situations, and I can't see a difference in the way they display - what am I giving up by not using gmap.css?
Comment #5
bdragon CreditAttribution: bdragon commentedAhh, caching problems. That makes sense.
You aren't missing much by having gmap.css disabled. The align= stuff in macros won't work, the copyright string will stick out of the right side of very small maps, and I think that's about it.
Comment #6
bdragon CreditAttribution: bdragon commentedI just removed an old hack from gmap.css that *might* have an effect on this.
http://drupal.org/cvs?commit=171214
http://drupal.org/cvs?commit=171215
Comment #7
tassoman CreditAttribution: tassoman commentedThe problem still exists.
So @ line 266 of gmap.module you could introduce a check against HTTP_USER_AGENT to solve the caching problem with IE:
Comment #8
Aron NovakThe fix in #7 works perfectly!
However the issue does not appear in IE8.
It would be awesome to commit #7 , but exclude IE8 from the condition.