Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1058326

    whiteoaklibrary
    Participant

    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

    #1058331

    Jade
    Moderator

    Hi 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!

    #1058499

    cloudtribal
    Participant

    Hi!

    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,

    #1058841

    Rad
    Moderator

    Hi 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!

    #1059431

    websperations
    Participant

    I 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

    #1059436

    websperations
    Participant

    I replaced the Cornerstone Map element with a text element and used IFRAME code.

    Hopefully you get this Buggy Cornerstone Map item working properly.

    Micah

    #1059545

    Rad
    Moderator

    Hi 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.

    #1060189

    lenax29
    Participant

    Make 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.

    #1060202

    DaveDanger
    Participant

    thx! it Work!!!

    #1060413

    Lely
    Moderator

    Glad you got it working. Thank you also @lenax29 for sharing those information.

    Cheers!

    #1061519

    nolannp11
    Participant

    Really 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?

    #1061575

    Christian
    Moderator
    #1076012

    Spomky
    Participant

    Hi,

    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?

    #1076136

    Rue Nel
    Moderator

    Hey @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 / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1079144

    Spomky
    Participant

    Hi,

    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.