5.7.5.2 - Google Maps "Unable to display map: google is not defined"
Permalink 1 user found helpful
C5 5.7.5.2 / Fruitful / Linux / Apache
Problem: All clients/browsers receive the following error when viewing the page with the Google Maps feature;
Unable to display map: google is not defined
Sometimes if I clear the browser cache on the client it works, but we have seen this on devices that have never accessed the site. It is noteworthy that we *never* see the error when previewing it as admin regardless of browser. We have tried to change the Maps feature to enable scrolling/disable scrolling/changed address to place to long/lat. Nothing seems to work. We have tested: Firefox, Chrome, IE and all three exhibit the same behavior.
Question: Has anyone else seen this? If so, any ideas on how to solve it or should we just disable the feature?
Problem: All clients/browsers receive the following error when viewing the page with the Google Maps feature;
Unable to display map: google is not defined
Sometimes if I clear the browser cache on the client it works, but we have seen this on devices that have never accessed the site. It is noteworthy that we *never* see the error when previewing it as admin regardless of browser. We have tried to change the Maps feature to enable scrolling/disable scrolling/changed address to place to long/lat. Nothing seems to work. We have tested: Firefox, Chrome, IE and all three exhibit the same behavior.
Question: Has anyone else seen this? If so, any ideas on how to solve it or should we just disable the feature?
C5 5.7.5.2 | Brimstone | Linux | Apache
I am experiencing the exact same behavior with a site that went live yesterday.
The site on the dev server works fine.
I have had to replace the google maps with images in the short term.
A test page with the map block can be viewed here.
http://pdc.wa.gov.au/google-map... which despite my best efforts to duplicate the issue is currently working as it should.
I will run some more tests.
Colin
I am experiencing the exact same behavior with a site that went live yesterday.
The site on the dev server works fine.
I have had to replace the google maps with images in the short term.
A test page with the map block can be viewed here.
http://pdc.wa.gov.au/google-map... which despite my best efforts to duplicate the issue is currently working as it should.
I will run some more tests.
Colin
I have done some more tests and have been unable to reproduce the issue on my Dev server or on the test page I made.
Not sure why it works on the dev server and not on the live server as they are the same other than the caching is on for the live site.
So I made a copy of the original contact page and the google map error is on this page.
After playing with various combinations of blocks and settings I have found the following;
When Logged in -
If I place the map block into area with this grid code
it does not display a map, just marker on grey background.
If placed in a layout within this area the map displays.
If placed in area without setAreaGrid etc map displays.
When not logged in -
If map block is only on page within an area that has setAreaGrid code I get Unable to display map:Google is not defined. This also occurs if the map block is in a layout within this area.
If a map block is placed on the page in an area with out the setAreaGrid code the map block seems to work.
If map blocks are in both areas the block works in all places other than the marker on a grey background on block in the setAreaGrid area and not in a layout within this area.
So in my case it is related to the setAreaGrid being used.
I hope all this helps someone come up with a solution
Colin
Not sure why it works on the dev server and not on the live server as they are the same other than the caching is on for the live site.
So I made a copy of the original contact page and the google map error is on this page.
After playing with various combinations of blocks and settings I have found the following;
When Logged in -
If I place the map block into area with this grid code
<?php $a = new Area('Lside Column 4'); $a->setAreaGridMaximumColumns(12); $a->display($c); ?>
it does not display a map, just marker on grey background.
If placed in a layout within this area the map displays.
If placed in area without setAreaGrid etc map displays.
When not logged in -
If map block is only on page within an area that has setAreaGrid code I get Unable to display map:Google is not defined. This also occurs if the map block is in a layout within this area.
If a map block is placed on the page in an area with out the setAreaGrid code the map block seems to work.
If map blocks are in both areas the block works in all places other than the marker on a grey background on block in the setAreaGrid area and not in a layout within this area.
So in my case it is related to the setAreaGrid being used.
I hope all this helps someone come up with a solution
Colin
Colin, nice digging here as we did not even get that far. However, we decided to leave the workaround using simple image of Google maps with the url for now until a future version of C5 fixes this (or a simple C5 v5.7 Google Maps plugin is developed). Thanks!
Colin, This is what we have done as well. It works consistently. -Kevin
I can confirm the same error.
While logged in the Google maps link works. When logged out I get the same error message.
Unfortunately, my site is not available to be viewed by others. Hopefully it will be by the end of today.
While logged in the Google maps link works. When logged out I get the same error message.
Unfortunately, my site is not available to be viewed by others. Hopefully it will be by the end of today.
I think you are going to find that it works inconsistently no matter what you do. I recommend you consider a simple cropped image of Google Maps linked to the correct Google Maps url.
For simple, but general (not C5), instructions see here:http://www.techrepublic.com/article/link-the-business-address-on-yo...
Note that you may be able to embed a map too (depending on your C5 layout and theme) See:https://support.google.com/maps/answer/3544418?hl=en...
For simple, but general (not C5), instructions see here:http://www.techrepublic.com/article/link-the-business-address-on-yo...
Note that you may be able to embed a map too (depending on your C5 layout and theme) See:https://support.google.com/maps/answer/3544418?hl=en...
@ksalisbury
@GNUguy
@cmerritt
Have you checked the bug tracker to see if others are experiencing this issue? If no one has reported this issue, I recommend reporting it and including the steps required to repeat the error.
concrete5 bug tracker
https://www.concrete5.org/developers/bugs...
@GNUguy
@cmerritt
Have you checked the bug tracker to see if others are experiencing this issue? If no one has reported this issue, I recommend reporting it and including the steps required to repeat the error.
concrete5 bug tracker
https://www.concrete5.org/developers/bugs...
+1
Seeing the same issue.
Seeing the same issue.
+1
Although this bug was apparantly fixed in 5.7.5.3 we recently saw the same behaviour appear on 5.7.5.8 (but never when logged in)..
On investigating, it seems the block had been copied from another page (although then given a different map location), so:
1/ we edited it slightly to make sure it created a new instance
2/ then made sure the block cache was set to 'off' and the override to 'on'
This fixed the problem for us.
On investigating, it seems the block had been copied from another page (although then given a different map location), so:
1/ we edited it slightly to make sure it created a new instance
2/ then made sure the block cache was set to 'off' and the override to 'on'
This fixed the problem for us.
What is the link to your website?