Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #657709

    I just transferred my site from .net to .com and am getting the following error on my Google Maps now:

    Oops! Something went wrong.This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

    They load briefly and then disappear, followed by the message relayed above.

    I tried rebuilding the page to no avail. Is there an easy/quick fix for this?

    #657715

    I’ve read through a few threads about getting an API key, but I’m lost with how to do that – https://developers.google.com/maps/documentation/javascript/get-api-key#premium-auth – I went to that page and from there, I’m not sure where to go or what to do.

    Easier fix?

    #657748

    Hey!

    You have to create a new app and get the API key from that application and use it.
    Let me know if you do have more questions, we would love to assist

    Best regards,
    Basilis

    #657766

    Hi,

    This part is getting me hung up

    “You have to create a new app and get the API key from that application and use it.”

    After getting to https://console.developers.google.com, I have no clue what to do or how to get the correct key.

    #657775

    I think I have the correct API key – it is one for a browser.

    Here is what I added to my the functions.php file of my child theme (in bold):

    <?php
    //
    // Recommended way to include parent theme styles.
    // (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    //
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }
    //
    // Your code goes below
    //

    function gmaps_workaround(){
    ?>
    <!–Google Maps JavaScript API –>
    <script src=”https://maps.googleapis.com/maps/api/js?key=MY_API_CODE_HERE”
    type=”text/javascript”></script>
    <?php
    }
    add_action(‘wp_footer’, ‘gmaps_workaround’);

    • This reply was modified 5 years, 3 months ago by  shawnbanack.
    #657822

    Any word on this?

    • This reply was modified 5 years, 3 months ago by  shawnbanack.
    #658215

    After spending more time on this than reasonable, the only “fix” that actually worked was the one provided by @mensmaximus.

    “@vinay yes it is a change in the google api however it is a theme issue because the theme is using a deprecated api call.

    For those in need of a quick fix please go to https://console.developers.google.com create an account, an app and then a browser api key. If you don’t know what I am talking about visit https://developers.google.com/maps/documentation/javascript/get-api-key for help.

    After you have created your key login to your ftp account and browse to /wp-content/themes/enfold/js/. Copy the file shortcode.js to your local computer. Open it in a text editor and locate line 458

    src: ‘https://maps.googleapis.com/maps/api/js?v=3.24&callback=aviaOnGoogleMapsLoaded’

    Now append your key to that line:

    src: ‘https://maps.googleapis.com/maps/api/js?v=3.24&callback=aviaOnGoogleMapsLoaded&key=Put_your_google_api_browser_key_here’

    Save the file and copy it back to your server. You might make a copy of the old file and keep it if you need it again.

    The same change must be made to the file /wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/js/avia-element-behavior.js on line 55.

    Remember this file will be overwritten with the next update.

    Important: You need to clear you browser cache and any cache from caching plugins to see the changes.”

    Going forward, I understand this will need to be updated repeatedly as updates come out – would it not be possible to supply a Google API Key field in the editor, which will automatically insert the codes where required?

    #658216

    Hey!

    Yes, that is what we will do
    Kriesi is working on the update and will allow users do that.

    Thanks a lot for your patience and understanding

    Cheers!
    Basilis

    #670370

    My maps are no longer working either. please advise. thanks . Jen

    #670373

    Hi!

    Please make sure that you are using the latest version of Enfold which is currently 3.7.1 – http://kriesi.at/documentation/enfold/updating-your-theme-files/ and check out this post – http://kriesi.at/documentation/enfold/how-to-register-a-google-maps-api-key/

    Best regards,
    Yigit

    #670398

    excellent. fixed. thanks.

    #670400

    Hey!

    Great!
    We will keep the thread open will wait to hear from the OP. If you have any other questions or issues, please feel free to start a new thread.

    Regards,
    Yigit

    #671538

    This is still not working – latest version of WP and Enfold ????

    #672440
    #672445

    Hi,

    @andyqueanda: Thanks for sharing.

    For anyone else with the issue, just follow the instructions provided in the link above.

    Best regards,
    Ismael

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Google Maps Error – Oops! Something went wrong. This page didn't load Google Map’ is closed to new replies.