Tagged: cornerstone
-
AuthorPosts
-
June 24, 2016 at 12:53 pm #1058326
Hi,
My Google Maps Element is not working properly. It appears with the text “Oops! Something went wrong. This page didn’t load Google Maps correctly. See the JavaScript console for technical details.”
When I look at the JavaScript console it says:
“Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error”
“Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys”
I recently changed my primary domain name. Could this have caused the error?
– JS
June 24, 2016 at 12:59 pm #1058331Hi there,
Thanks for writing back. Kind;y follow this reply and others on this thread – https://community.theme.co/forums/topic/google-map-questions/#post-781101
Hope this helps.
Cheers!
June 24, 2016 at 3:18 pm #1058499Hi!
Since Wednesday, you need an API key for new sites.
Could I please know where the file that makes the API call is located so I can patch this up quickly?
http://googlegeodevelopers.blogspot.ca/2016/06/building-for-scale-updates-to-google.html
Thanks and best regards,
June 24, 2016 at 8:45 pm #1058841Hi there,
You may directly edit this file, for now, \wp-content\plugins\cornerstone\includes\shortcodes\google-map.php
Then add your API Key like this,
wp_register_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY' );
Cheers!
June 25, 2016 at 2:45 pm #1059431I am also getting this error.
Oops! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details.http://dev.dynatekindustries.com/contact-us/
I created an API key with Google and added:
wp_register_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCLRQs_xbC974LYOdv0xWbS9NGd3MhfuuM' );
to the end of
\wp-content\plugins\cornerstone\includes\shortcodes\google-map.php
It’s been 24 hours since I generated the API Key so I am confident the key is active.
How can I fix this?
Micah
June 25, 2016 at 2:55 pm #1059436I replaced the Cornerstone Map element with a text element and used IFRAME code.
Hopefully you get this Buggy Cornerstone Map item working properly.
Micah
June 25, 2016 at 5:51 pm #1059545Hi Micah,
We’ll check that out, though, this recent limitation is imposed by google and not us. And it’s just recent, Wednesday, June 22, 2016. We’re not able to release the update right away, but we will surely update it.
Another related thread https://community.theme.co/forums/topic/map-error/ with same solution. It maybe just related to your API Key or Project setting why it’s not working.
Thanks and stay tuned.
June 26, 2016 at 11:18 am #1060189Make sure you have generated a proper key, you need Google Maps Javascript API > Browser Key.
AND you also need to define the domain properly.
Like so >
yourwebsite.com/*
*.yourwebsite.com/* (if using subdomains).. I just got it working for me.
June 26, 2016 at 11:48 am #1060202thx! it Work!!!
June 26, 2016 at 4:30 pm #1060413Glad you got it working. Thank you also @lenax29 for sharing those information.
Cheers!
June 27, 2016 at 8:54 am #1061519Really need a fix for this that doesn’t require modifying code that will be overwritten with the next update. Should I setup a child theme to implement this temporary fix?
June 27, 2016 at 9:22 am #1061575Please try following https://community.theme.co/forums/topic/map-error/#post-1059000
Thanks.
July 7, 2016 at 1:51 am #1076012Hi,
I installed and modified the child theme and it worked properly.
Today, I updated the Cornerstone plugin and now it is broken again and I have the following message:You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
How to be sure to load the https://maps.googleapis.com/maps/api/js script only once?
July 7, 2016 at 3:54 am #1076136Hey @spomky,
Thanks for updating this thread! To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
July 9, 2016 at 5:04 am #1079144Hi,
The website is https://www.gite-vercors-38.fr/ , but I am sorry I cannot provide you an account.
I tried several modifications that are:Trying to dequeue the ‘cs-google-maps’ script in the
function.php
file from the X Child Theme:function cs_gg_maps_dequeue_script() { wp_dequeue_script( 'cs-google-maps' ); } add_action( 'wp_print_scripts', 'cs_gg_maps_dequeue_script', 100 );
Trying to comment out the following lines from the
cornerstone/includes/shortcodes/google-map.php
:wp_register_script( 'cs-google-maps', $script_url ); wp_enqueue_script( 'cs-google-maps' );
The first solution does not work, but the second solution does.
The problem is that this hack will not work anymore if the plugin is updated. -
AuthorPosts