Tagged: google map
-
AuthorPosts
-
August 8, 2017 at 4:38 pm #835906
I had implemented the fix that was recommended in another post to address embedded Google Maps not displaying/showing an error by placing the code below in the functions.php file, but it is no longer working. It had been displaying fine until recently. If someone could help with this, it would be great.
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');
August 9, 2017 at 1:31 pm #836367Hey NicomIT,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardAugust 9, 2017 at 2:05 pm #836402Sure. The info is below.
Also, I notice the same thing is happening on one of our client’s websites. I included two links to that as well.
August 10, 2017 at 7:34 am #836789Hi,
Thanks for the details, though the login URL only redirects me to the front page. On what page can we log in?
Best regards,
RikardAugust 10, 2017 at 1:42 pm #836969Hi Rikard,
That should have worked, but I disabled some of the additional features in the security tool we are using when you login. So maybe that was the issue. You can also try logging in using the link below.August 11, 2017 at 7:06 am #837324Hi,
Sorry but I’m still getting redirected, I tried using VPN with a dutch IP as well but the same thing happens. I’m not sure why?
Best regards,
RikardAugust 11, 2017 at 1:33 pm #837443Hi Rikard,
I had another look at the security tool (I’m using iThemes Security Pro) and I think I might know what the issue is. I had “Away Mode” enabled for hours I wouldn’t need to login to the website. So with the time difference you might have been trying to login when that was set to not allow access to the the WP dashboard. I disabled that, so hopefully you can login now.August 11, 2017 at 4:28 pm #837503Hi,
I checked the site. You have to link Enfold to a valid Google Maps API key.
Goto Dashboard -> Enfold -> Google Services and enter a valid API key.
Hope, this will help to solve the problem.
Best regards,
GünterAugust 14, 2017 at 4:58 pm #838783Thanks Günter. I created a key and added it. So far the map is still not loading though. Is there anything else I need to do? Or just keep checking/refreshing the page until the key is recognized?
August 14, 2017 at 5:55 pm #838834Hi NicomIT,
Here is the error that you’re getting:
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-errorBest regards,
VictoriaAugust 14, 2017 at 8:50 pm #838941Thanks Victoria. I added the domain to the referrer settings, but it’s still not working. I think the issue is on Google’s end and I’m likely leaving something out, but I have no idea what it is. The instructions for this from Google are not very clear.
August 15, 2017 at 3:08 pm #839328So I’ve followed the instructions from Google as best as I can understand them and added the new API key in the theme options as instructed here. But the map still isn’t working. I have included links to two screenshots below. The first one is the page via Google where I created the key and the second is an error I get when I edit the existing map and click on the “Fetch Coordinates” button. The error says, “The key is probably either restricted to the wrong domain or the domain syntax you entered is wrong.” However, the domain I entered is correct and is for the website the map is set-up on. I’m not sure what to do now and can’t tell if I’m missing a step, or if there is an issue with the theme that is causing this. Any help would be great.
August 15, 2017 at 5:06 pm #839416Hi NicomIT,
Try using wildcards like *.nicominteractive.com/*
Is this key used only for this website?Best regards,
VictoriaAugust 15, 2017 at 7:08 pm #839519Hi Victoria,
I added *.nicominteractive.com/* and still no luck. This key was created only for this website and for the issue with the map.August 17, 2017 at 3:35 pm #840453Hi, I was just wondering if there was anything else I can try? It looks like I am following all the instructions correctly, but the map still isn’t loading.
August 18, 2017 at 9:29 pm #841035Hi,
Create a new key please, so we can be sure that the cache is fixed and that the URL is like what Victoria suggested.
Also make sure that you give it sometime to be crawled and do let us know if that would fix the issues.Best regards,
BasilisAugust 21, 2017 at 2:03 pm #842004Hi Basilis,
I regenerated the key again and still can’t get the map to display. When I click the “Check API Key” button under the theme options > “Google Services” it says the key is valid. But when I try to add the map to the contact page, I get this message when I click the button to fetch the coordinates for the address:An error occurred
It seems that your Google API key is not configured correctly
The key is probably either restricted to the wrong domain or the domain syntax you entered is wrong.
Please check your API key here
The domain that should be allowed is:
http://www.nicominteractive.com/*Under the key I am using now I have “HTTP referrers (web sites)” selected under the key restriction area and http://www.nicominteractive.com/* added under “Accept requests”.
As near as I can tell, I’m following all the steps correctly. But still no luck.
August 23, 2017 at 7:37 pm #843238Hi,
Oh – I just noticed and I am sorry for that.
The web site needs to be on https: so it can work properly.
You need a SSL certificate.Best regards,
BasilisAugust 24, 2017 at 7:56 pm #843664Hi Basilis,
I was able to figure out the issue. There was a fix related to embedding Google maps provided by your support a while ago when Google started requesting an API key to be used. The code and key below was provided by Kriesi to add to the ‘functions.php’ file. I think now that I added my own API in the theme options, it was conflicting with the API in the ‘functions.php’ file. I removed the code and API key below from the file and now the map works. From what I can see there isn’t a need for an SSL certificate.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');
August 28, 2017 at 7:17 pm #844987After my last post I tried to make the same fix on the other website (linked below) where I was seeing the same issue. I deleted the code mentioned above from the ‘functions.php’ file and regenerated an API key exactly as I did for the website where the map is working, but no luck. Am I the only person who has been experiencing this problem? I’m pretty sure I am doing everything correctly. I’d really appreciate any help you can provide to help resolve this. Thanks.
August 29, 2017 at 5:04 am #845178Hi,
Yes, you have to remove the previous code in the functions.php file. Regarding the other site, we can see the following error.
Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error
Did you delete the API project? Please re-create it, add the site as one of the http referrers then insert this code in the functions.php file.
function set_custom_google_maps_source( array $api_src ) { $api_src['version'] = '3.30'; return $api_src; } add_filter( 'avf_google_maps_source', 'set_custom_google_maps_source', 10, 1 );
Best regards,
IsmaelAugust 29, 2017 at 3:28 pm #845362Thanks Ismael. Yes, I removed that code from the ‘functions.php’ file in both websites. I added the code you just provided to the second website (http://www.brunelloestates.com/) and recreated the key, however the map still isn’t working. I provided a screenshot below of how the key is configured, which is the same as what I did for the first website. So I’m not sure what the problem is.
The only thing I can think of is the website used another plugin (https://codecanyon.net/item/google-maps-plus-for-visual-composer/13510102) that embeds a Google map. Maybe there is some conflict. But I disabled the plugin and it didn’t help.
August 30, 2017 at 4:56 am #845559Hey!
I’m sorry about that. The filter does not exist yet in the current version. For now, please edit the config-templatebuilder > avia-shortcodes > google_maps.php file, look for this code around line 37.
$api_url = $prefix.'://maps.google.com/maps/api/js?v=3.27';
Set the version from 3.27 to 3.30. In the next update, we’ll include the filter so that you don’t have to edit this file.
Cheers!
IsmaelAugust 30, 2017 at 1:49 pm #845784Thanks Ismael. I updated the version number in that file and unfortunately the maps still aren’t working. When I put in the API code in the theme options and click the “Check API Key” button, I get the “Could not connect to Google Maps with this API Key” message. As I mentioned before and as you can see in the screenshot, I’m pretty sure I have the key set-up correctly. I also tried removing the code provided in your previous post in the ‘functions.php’ file, but that didn’t help, so I put it back in.
September 1, 2017 at 9:16 am #846708Hi,
Please remove the code in the functions.php file because it will conflict with the theme’s API key option. I tried to login to the site but the previous login credentials are not working anymore.
Best regards,
IsmaelSeptember 5, 2017 at 3:45 pm #848168Hi Ismael,
I removed this code from the “functions.php” file:function set_custom_google_maps_source( array $api_src ) { $api_src['version'] = '3.30'; return $api_src; } add_filter( 'avf_google_maps_source', 'set_custom_google_maps_source', 10, 1 );
And the “config-templatebuilder > avia-shortcodes > google_maps.php” file has the updated version number you provided on this line of code:
$api_url = $prefix.'://maps.google.com/maps/api/js?v=3.30';
The maps still aren’t displaying. So I’m not sure what else I can try. I’m sure I have done everything correctly.
The login info I provided a couple of weeks ago was for a separate website that was having the same issue. See the private info for this post for a login to this website.- This reply was modified 7 years, 2 months ago by NicomIT.
September 7, 2017 at 3:49 am #848926Hi,
I checked the Google Services panel and I got the following error.
js?v=3.27&key=AIzaSyDhPffnlVat4C-7NIk8l3EZxMFfJaYO3yE:35 Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error
_.rb @ js?v=3.27&key=AIzaSyDhPffnlVat4C-7NIk8l3EZxMFfJaYO3yE:35
js?v=3.27&callback=av_backend_maps_loaded&key=AIzaSyDhPffnlVat4C-7NIk8l3EZxMFfJaYO3yE:38 Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-errorIt means that the map API has been deleted. Are you sure that you’re using the correct API key? Please re-create the API project and get a new API key.
// http://kriesi.at/documentation/enfold/how-to-register-a-google-maps-api-key/
The “Retired Version” notification is not critical so the map should work even if it is using the old script.
Best regards,
IsmaelSeptember 7, 2017 at 2:35 pm #849109Hi Ismael,
The key I had been using should be correct and still active. So I don’t know why the error said it had been deleted. I created a new project and API key and the map still doesn’t work. I have no idea what I’m doing or not doing, but I would love to get this resolved.September 8, 2017 at 8:32 am #849473Hi,
It’s still producing the same error. Please post the gmail account and the security questions. We’ll inspect it.
Best regards,
IsmaelSeptember 8, 2017 at 1:31 pm #849578See the private data.
- This reply was modified 7 years, 2 months ago by NicomIT.
-
AuthorPosts
- The topic ‘Google Map Not Displaying After Making Recomended Fix’ is closed to new replies.