Closed (fixed)
Project:
GMap Module
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2007 at 13:13 UTC
Updated:
22 Sep 2007 at 00:04 UTC
There is a javascript error, and the map doesn't show. Same thing happens in the demo sites of this module.
The errors are:
_mFlags is not defined
http://www.google.com/mapfiles/55a/maps2.api/main.js
Line 300
GLatLngBounds is not defined
http://photo-tips.ca/gmapfeeddemo
Line 132
Comments
Comment #1
afagioliHave you got this error?
Error: _mFlags is not defined
Source File: http://www.google.com/mapfiles/55a/maps2.api/main.js
Line: 300
I'm having the same problem, on sites that used to happily run the gmap module for months, till a few hours ago
After a quick debug, since all my "stuff" is in order, I've started to think about an update of the http://www.google.com/mapfiles/55a/maps2.api/main.js
Comment #2
steve hanson commentedYou're not alone. There seems to be some belief that this MAY be because Google has started throttling V1 API requests - but that' just speculation at the moment.
Mine all broke today as well.
Comment #3
jredding@drupal.org commentedyup.. my sites are down too.
Comment #4
liorkesos commentedHi,
Could this be a 4.7.x thing?
2 sites I have are down and both run 4.7.x based gmap mashups.
A friend has a 5.x site which seems to be working fine?
Can anyone confirm? 5.x sites working well?
Does anybody know what api versions each use?
Lior
Comment #5
jredding commentedGood catch..
My 5.1 sites are up and running. the 4.7 sites are down for the count.
Comment #6
liorkesos commentedOk,
I found a temporary workaround inspired by the help of bdragon...
It appears google is doing something funky reading the api ver and acting accordingly.
I don't understnad it totally but if you change line 31 in gmap/gmap.module from
to
Things get normal again - I guess they have some conditionals on the version of the api - maybe a >= 2.x something and maybe supplying a generic 2 version we live within the condition.
Hope this helps..
Bdragon if this persists would you consider committing this formally to enable 4.7 gmap usage?
thanks for your help today
Lior
Comment #7
jredding commentedYou already know.. but its confirmed to work.
Thank you for the workaround!
Comment #8
z.stolar commentedMaybe we don't need to go that far backwards. Have you tried other versions?
Look here for a complete changelog of google maps API: http://mapki.com/wiki/Changelog
Can API version number be modifiable via settings? This would speed up debugging.
Comment #9
bdragon commentedSorry, the API version can't be modified with settings. The 5.x version is currently using "2" (I changed it yesterday because I needed to pick up some new features that were added since the last time I bumped the version)
I am a little reluctant to do the same for the 4.7 version, but if things either fix themselves, or there's a later version that doesn't break anything, I'll apply it to DRUPAL-4-7--2.
I can't test Drupal 4.7 stuff myself, but I'll apply anything you guys need that's sane and has been tested, within reason... I _really_ don't want to have to debug the 4.7 version, it's very different than the 5.x version.
Comment #10
liorkesos commentedTesting/Production environment.
We (Linnovate) have two environments running 4.7 mashups and we can try the commits on our environments.
If you plan commiting we can test it before..
best regards
Lior
Comment #11
afagioliI do confirm the
(#6 submitted by liorkesos on May 24, 2007 - 19:54) has solved my issue
thanks a lot!
Comment #12
pbarnett commentedYup; the workaround fixed all my 4.7 sites too.
Thanks, guys!
Comment #13
eferraiuolo commentedHad the same problem, interesting to see all of us found it today! :)
Did what Update #6 (liorkesos) suggested, and maps are back and working like normal!
Nice find and quick fix liorkesos!
Comment #14
nipaed commentedi confirm both symptoms and workaround (thanls a lot for it :) for 4.7 gmap module
Comment #15
jpsalter commentedDitto for me - this version changed fixed my 4.7 sites.
Comment #16
jpsalter commentedI spoke too soon. The version change worked for one page load - then upon the second page load I get this js error:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.google.com/mapfiles/78/maps2.api/main.js :: mb :: line 36" data: no]Any ideas?
Comment #17
ahoeben commentedfix works as advertised, thanks
Comment #18
ryanlath commentedThis fixed the maps showing up, but to get my lines to work, I had to use version '2.69'. Hope that helps anyone having similar problems.
Comment #19
jpsalter commentedBoth version settings work for me (v2 and v2.69).
But, nothing works when I have the thickbox module installed. This gives the error:
[Break on this error] undefined style.css (line 772) uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.google.com/mapfiles/69/maps2.api/main.js :: gb :: line 36" data: no]
It took a while to sort this out because I installed thickbox.module at the same time that v2.55a stopped working. I hope no one else has this problem. Now - to sort out the thickbox problem - I'll post my issue there.
Comment #20
tom_o_t commentedMy maps have stopped working again - same javascript error with GLatLngBounds is undefined... - seems to have just happened, midday East Coast time.
Comment #21
tom_o_t commentedTo get my maps working again I had to do a messy hack - commenting out the line:
Somewhere around line 153
The bounds variable is used for autozoom, so this will probably stop working if you use it. It also seems to be used with clusterer, but I've never managed to get clusterer working anyway, so I don't mind about that! I used this in combination with fix #6 above, to prevent the javascript errors about GIcon and _mFlags being undefined.
I hope someone with better bugfixing abilities can figure out what exactly's going on here...
Comment #22
benma commentedsubscribing
Comment #23
ajwwong commentedI can confirm 2.69 as working. Thanks everyone... you're great!
Comment #24
tom_o_t commentedYeah, 2.69 working with me too - ignore my last entry - that was with V2.
Comment #25
eferraiuolo commentedversion 2.69 is also working for me. I think this is ready for a patch to be submitted.
Comment #26
janv@www.drupalsites.net commentedVersion 2.69 works for me as well.
Comment #27
marius.s commentedThat's what helped me get the gmap working again:
1. Changing the version to 2.69.
2. Disabling thickbox module.
3. Resubmitting the map again.
Comment #28
bdragon commentedOK, changed map version to 2.69 on DRUPAL-4-7--2 and DRUPAL-4-7 (as it's a one liner and everyone's 4.7 sites are broken due to this...)
Comment #29
mndonx commentedI guess I'm in the minority - tried 2 and 2.69 and neither cleared the _mFlags or the GLatLngBounds errors. Any ideas?
Comment #30
bdragon commented