Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #857042

    I have been having problems getting embedded Google Maps to display and the API keys I create to work, even though it looks like I am doing everything correctly. See my previous post (https://kriesi.at/support/topic/google-map-not-displaying-after-making-recomended-fix/).
    I still am having problems on one of our websites (the contact page where the map should display is linked in the private info).
    One of our developers had a look and saw this error in the Chrome developer tools console:
    https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
    Does this mean anything to you or help at all?

    #857067

    Hey NicomIT,

    Please try disabling all active plugins and see if the issue resolves.

    Best regards,
    Jordan Shannon

    #857102

    Hi Jordan,
    I gave that a try, but no luck. When I added the map and tried to fetch the corridnates, I got this message:

    An error occurred
    Google changed the way google maps work. You now need to enter a valid Google Maps API Key
    You can read a description on how to create and enter that key here: Enfold Google Settings

    #857170

    Hi,

    Please provide a link to the page/site in question.

    Best regards,
    Jordan Shannon

    #857493

    In the private info is a copy of the page where I am trying to embed the map. The grey area is where the map should be displaying. I still get the error message from my previous post every time I try to enter our address and fetch the coordinates.

    #857523

    Hi,

    Apologies for the amount of time this is taking to solve, but it is uncommon. We have seen users recently with that error message, however, the map still displays. Can you check if the following block is in your functions.php file and if so please remove it:

    function ava_googlemaps_apikey() {
    	$prefix  = is_ssl() ? "https" : "http";
        wp_deregister_script('avia-google-maps-api');
    	wp_register_script( 'avia-google-maps-api', $prefix.'://maps.google.com/maps/api/js?key=AIzaSyAidX34J-pkIHmOUFdVrt05MpzDHz-VZUk', array('jquery'), '3', true);
    	wp_enqueue_script('avia-google-maps-api');
    }
    add_action('init', 'ava_googlemaps_apikey');

    Best regards,
    Jordan Shannon

    #857540

    I checked and that code isn’t in the ‘functions.php’ file in both the child and parent themes. I did use that fix in another website a while ago when Google changed things requiring an API to be used. It was provided here. I removed it from that website and after getting an API created/adding it in the theme options, eventually we were able to get the map to work. But that hasn’t been the case with this website for some reason.

    #857584

    Hi,

    Please allow me to get my teammates thoughts on this issue.

    Best regards,
    Jordan Shannon

    #857617

    Hi!

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? Did you provide the coordinates for the map? I am seeing this
    https://cl.ly/1O3K122F0o0E

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #857621

    Sure, here you go.

    #857680

    Hi NicomIT,

    Looks like your key is not activated? Are you using this key for just this project or for multiple projects?

    Best regards,
    Victoria

    #857682

    Hi!
    It appears the API key you have entered is not valid. Please check Enfold > Google Services for more info.

    Please follow the step by step instructions in the below link to create a new API key

    Regards,
    Vinay

    #857701

    I created the key only for this website and the map on the contact page, so it’s not being used anywhere else. Under “Key Restriction” where the API is managed via Google APIs & services, I have “HTTP referrers (web sites)” selected and both nicomit.com/* and http://www.nicomit.com/* added under “Accept requests from these HTTP referrers (web sites)”. And the key was activated under “Google Maps JavaScript API” in the library section of Google APIs & services.
    This is pretty much exactly what I did when creating two other keys we are using in another two different websites that the embedded map is working on.

    #858364

    Hi,

    What is the login url? I tried “wp-login” and “wp-admin” but it’s not working. Did you remove the map in the contact page?

    Best regards,
    Ismael

    #858469

    Hi Ismael,
    Those should work. Maybe try ‘wp-login.php’ if you haven’t already.

    I removed the map on the live page. But it’s still on the copy of the page I made (linked below). But the page isn’t displaying anything where the map should be. Just a big grey area. Likely because I can’t get the coordinates when I enter the street address, city and country. That’s when I get the error I mentioned earlier:

    An error occurred
    Google changed the way google maps work. You now need to enter a valid Google Maps API Key
    You can read a description on how to create and enter that key here: Enfold Google Settings

    #858675

    Hi,

    The “wp-login” is still not working. It redirects to the home page. This is the error in the console.

    avia.js?ver=4.1:123 [AVIA-MAP-ERROR] Latitude or Longitude missing
    util.js:216 Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
    uB.j @ util.js:216

    Did you fetch the coordinates?

    Best regards,
    Ismael

    #859302

    I’m not sure why the login link isn’t working. If you can send me your IP address, I can add it to the lock out white list in the security tool I am using to see if that helps.

    I’m not able to fetch the coordinates. When I try, I get the error I mentioned in my last post. I don’t know what to do to address the error from Google. if you can suggest something, I can try to address that.

    #859490

    Hey!

    Could you please disable the plugin temporarily so that we can check the dashboard? The map should still be working even if it’s using the “retired” version. The problem is that you can’t fetch the coordinates so we need to inspect the map element.

    Cheers!
    Ismael

    #859622

    Hi Ismael,
    I deactivated the security plugin. Hopefully that works and you can login.
    Ryan

    #859977

    Hi,

    Are you sure that API project was activated correctly? This is the error in the dashboard.

    14:16:57.036 js?v=3.27&callback=av_backend_maps_loaded&key=AIzaSyAFQ9Lum_M4yb2Pn0hFHsjqz7Gm_iYJrKA:38 Geocoding Service: This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/geocoding_backend?project=_ For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key
    _.rb @ js?v=3.27&callback=av_backend_maps_loaded&key=AIzaSyAFQ9Lum_M4yb2Pn0hFHsjqz7Gm_iYJrKA:38
    14:17:01.678

    Please generate an API key again or create a project from scratch. Just click the “Get a key” button in the following link.

    // https://developers.google.com/maps/documentation/javascript/get-api-key

    If it’s still not working, please post the gmail account and the security question so that we can test it.

    Best regards,
    Ismael

    #860158

    As far as I know, the API was created correctly. However I created a new one via the link you just provided (

    ) and was able to get the map to work. I have no idea what was different about how this key was created, but it worked, so everything is fine now. Thanks for the help.

    #860167

    Also, I just looked at both keys I created. The new one that worked is unrestricted and the other key is not. That looks to be the only difference between them. However, my understanding is the key should be restricted (Google actually recommends that).

    The keys I created for other websites using the embedded map have ‘HTTP referrers (web sites)’ enabled under key restrictions and their domain added under ‘Accept requests from these HTTP referrers (web sites)’. That is what I did for the first key here that didn’t work. I’m kind of confused about what the correct way to create the API keys should be.

    #860438

    Hi,

    Maybe, the previous http referrer restriction was invalid. Anyway, I’m glad that it’s working now.

    Best regards,
    Ismael

Viewing 23 posts - 1 through 23 (of 23 total)
  • You must be logged in to reply to this topic.