-
AuthorPosts
-
July 11, 2018 at 8:49 am #984075
Hi Kriesi,
My customer gave me a hint, that there is no google maps showing on there anymore. Just the blank space.
Please have a look. I checked the api key and it is still working with no restrictions. What could cause the problem?
Thanks for helping
DennisJuly 11, 2018 at 1:16 pm #984209Hey dennsen,
Please try this plugin to see if it helps: API KEY for Google Maps Another user was having a conflict and this solved their issue.Best regards,
MikeJuly 11, 2018 at 3:08 pm #984246Nope, didn’t work! Another solution?
July 12, 2018 at 2:55 am #984420Hi,
In the console you are getting this error:Failed to load resource: the server responded with a status of 500 (Internal Server Error)
I recommend disabling your plugins, and checking your webhost logs to see if you can find the source for the internal server error, if you can’t find it try asking your webhost as they can probably tell you very quickly.
Do you know what has changed on your site since the maps stopped working?Best regards,
MikeJuly 12, 2018 at 3:12 am #984425Hi,
I just tried to create a new map on a test page, and got an error that your api key is not configured correctly, Please see screenshot in Private Content area, and check your api key restrictions.
Although, it could be due to your internal server error, so please still look into that.Best regards,
MikeJuly 16, 2018 at 2:05 pm #985926Hi,
I’ve redone all the Google API things I could do and managed to make the map at http://www.pension-windrose.de/anreise/ work again. Though it didn’t work on for example: http://www.zimmervermittlung-windrose.de/ukunft/ferienwohnung-die-zeese/
It still doesn’t show the map. Both sites use the same API Key with no restrictions. I can’t find the error. Please help.Dennis
- This reply was modified 6 years, 4 months ago by Dennis.
July 17, 2018 at 8:32 pm #986621Hi,
You cant be using the same API key, API keys are based on domain name :)
Best regards,
BasilisJuly 18, 2018 at 12:08 pm #986913Hi,
That worked well before. But ok, now each site has its own api key and it still doesn’t work!
What else can I try?
Dennis
July 18, 2018 at 12:24 pm #986922Hi,
Please try going through the Google Maps settings, and find the Geocoding Service API and enable it which is now disabled by default.
https://developers.google.com/maps/documentation/javascript/geocodingBest regards,
MikeJuly 18, 2018 at 12:42 pm #986932Hi Mike,
Geocoding is enabled and was before!
Dennis
July 19, 2018 at 3:37 am #987242Hi,
I assume your Google Maps billing in enabled, but I was made aware of this change on 7/16:
As of July 16, 2018, Google maps will return error if billing is not enabled. https://developers.google.com/maps/documentation/javascript/usage-and-billingCould be worth looking into.
Best regards,
MikeJuly 19, 2018 at 8:18 am #987299Hi Mike,
Yes, billing is enabled. Question is, why does it work on one site, but not on the other?
Also: another plugin (progress map) on the main page also uses google maps and is working, too!
I need this to solve soon!
Dennis
July 20, 2018 at 8:09 am #987721Any other ideas?
July 20, 2018 at 1:50 pm #987825Hi dennsen,
Credentials did not work for me. Could you please update the credentials?
Best regards,
VictoriaJuly 20, 2018 at 2:04 pm #987832here you go
July 23, 2018 at 4:05 pm #988743Hi Dennis,
You have the footer.php and the header.php file in your child theme, did you update them with a fresh copy?
Best regards,
VictoriaJuly 24, 2018 at 10:49 am #989100Hi Victoria,
I renamed those two files so they are not in use at the moment. Still no change.
How can a visitor disable Maps? I don’t understand that message.
And where does that 500 error come from? I didn’t change anything before that error.July 24, 2018 at 8:54 pm #989360Hi Dennis,
I think you should check the server log for the error, it can be unrelated, but still.
Here is how to find it:http://snapcreek.com/blog/wordpress-error-log-friend/
Best regards,
VictoriaJuly 25, 2018 at 4:05 pm #989761That doesn’t help me. I have two websites on the same server. On one maps is running, on the other not. Both pretty similar and with Enfold. Both got their own api key. So what is wrong?
July 27, 2018 at 5:00 pm #990785Hi,
Please try to add this code to the child theme functions.php file (you can insert it at the very bottom before the ?> tag:
// Add scripts to wp_head() function child_theme_head_script() { ?> <script id='avia_gmaps_framework_globals' type='text/javascript'> /* <![CDATA[ */ var avia_framework_globals = avia_framework_globals || {}; avia_framework_globals.gmap_api = 'AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg'; avia_framework_globals.gmap_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg&callback=aviaOnGoogleMapsLoaded'; avia_framework_globals.gmap_builder_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg&callback=av_builder_maps_loaded'; avia_framework_globals.gmap_backend_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&callback=av_backend_maps_loaded'; avia_framework_globals.gmap_source = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg'; avia_framework_globals.gmap_avia_api = 'http://www.zimmervermittlung-windrose.de/wp-content/themes/enfold/framework/js/conditional_load/avia_google_maps_api.js'; /* ]]> */ </script> <?php } add_action( 'wp_head', 'child_theme_head_script' );
Best regards,
DudeJuly 30, 2018 at 8:52 am #991439Hi Dude,
I added your code and my functions.php now looks like this
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ function cspm_custom_infobox_title($default_title, $post_id){ // $custom_title = get_post_meta($post_id, "infobox_title", true); $custom_title = wp_title(); return (!empty($custom_title)) ? $custom_title : $default_title; } add_filter("cspm_custom_infobox_title", "cspm_custom_infobox_title", 10, 2); function cspm_custom_infobox_description($default_description, $post_id){ $custom_content = get_post_meta($post_id, "eg-beschreibung", true); return (!empty($custom_content)) ? $custom_content : $default_description; } add_filter("cspm_custom_infobox_description", "cspm_custom_infobox_description", 10, 2); add_filter("cspm_large_infobox_content", "cspm_custom_infobox_description", 10, 2); /* * 'ukunft' Post type für Avia Builder hinzugefügt */ add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'ukunft'; /*instead add the name of the custom post type here*/ } } return $metabox; } // Add scripts to wp_head() function child_theme_head_script() { ?> <script id='avia_gmaps_framework_globals' type='text/javascript'> /* <![CDATA[ */ var avia_framework_globals = avia_framework_globals || {}; avia_framework_globals.gmap_api = 'AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg'; avia_framework_globals.gmap_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg&callback=aviaOnGoogleMapsLoaded'; avia_framework_globals.gmap_builder_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg&callback=av_builder_maps_loaded'; avia_framework_globals.gmap_backend_maps_loaded = 'https://maps.googleapis.com/maps/api/js?v=3.30&callback=av_backend_maps_loaded'; avia_framework_globals.gmap_source = 'https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyBU4h5U0jMD-CbqGqHq4oVIFUN1ANB0Nhg'; avia_framework_globals.gmap_avia_api = 'http://www.zimmervermittlung-windrose.de/wp-content/themes/enfold/framework/js/conditional_load/avia_google_maps_api.js'; /* ]]> */ </script> <?php } add_action( 'wp_head', 'child_theme_head_script' ); ?>
Nothing changed regarding Google Maps. Is the code correct?
Dennis
July 30, 2018 at 9:09 pm #991713Hi,
I tried to log in to investigate the problem but I just got the error message “FEHLER: Cookies sind wegen einer unerwarteten Ausgabe gesperrt. Hilfe findest du in dieser Dokumentation oder wende dich an das Support-Forum.”
Can you please check if a firewall is active or if the wp-config.php is not saved in utf-8 (see https://www.innotag-internetagentur.de/geloest-cookie-probleme-beim-wordpress-login/ )
Best regards,
DudeJuly 31, 2018 at 8:12 am #991816Hi,
Now the login works again!
Dennis
August 2, 2018 at 4:27 am #992655Hi,
The map API is being loaded multiple times because of the “Progress Map” plugin. The theme’s map element works properly when the plugin is disabled (see private field). Do you really need that plugin?
Best regards,
IsmaelAugust 2, 2018 at 8:24 am #992751Hi Ismael,
Yes of course do I need that. It is a feature on the main page that uses that plugin. And it worked before together with the theme!
What could cause the conflict?
Dennis
August 2, 2018 at 9:07 am #992764Hi,
I’m not familiar with the plugin (we didn’t test it with Enfold and we can’t support it) but probably it uses the standard google maps api: https://developers.google.com/maps/documentation/javascript/tutorial like Enfold to embed Google maps. It seems like the plugin removes the Enfold maps code (i.e. the code I asked you to add to your functions.php is missing but there’s even more is missing, i.e. the coordinates of the maps marker, etc.) and thus the maps won’t work.
On the demo page here: https://kriesi.at/themes/enfold-2017/pages/contact/ for example the coordinates and map styling code looks like:
<script type='text/javascript' class='av-php-sent-to-frontend'>/* <![CDATA[ */ var av_google_map = {}; av_google_map['av_gmap_0'] = {}; av_google_map['av_gmap_0']['marker'] = {}; av_google_map['av_gmap_0']['marker']['0'] = {}; av_google_map['av_gmap_0']['marker']['0']['address'] = "Main Street, California"; av_google_map['av_gmap_0']['marker']['0']['city'] = ""; av_google_map['av_gmap_0']['marker']['0']['country'] = ""; av_google_map['av_gmap_0']['marker']['0']['long'] = -79.88742450000001; av_google_map['av_gmap_0']['marker']['0']['lat'] = 40.0577507; av_google_map['av_gmap_0']['marker']['0']['marker'] = 2078; av_google_map['av_gmap_0']['marker']['0']['imagesize'] = 80; av_google_map['av_gmap_0']['marker']['0']['tooltip_display'] = ""; av_google_map['av_gmap_0']['marker']['0']['av_uid'] = "av-3e0e9c"; av_google_map['av_gmap_0']['marker']['0']['icon'] = "https:\/\/kriesi.at\/themes\/enfold-2017\/wp-content\/uploads\/sites\/66\/2017\/02\/marker3.png"; av_google_map['av_gmap_0']['hue'] = "#35383c"; av_google_map['av_gmap_0']['zoom'] = 16; av_google_map['av_gmap_0']['saturation'] = "fill"; av_google_map['av_gmap_0']['zoom_control'] = 1; av_google_map['av_gmap_0']['streetview_control'] = false; av_google_map['av_gmap_0']['pan_control'] = false; av_google_map['av_gmap_0']['mobile_drag_control'] = 1; av_google_map['av_gmap_0']['maptype_control'] = ""; av_google_map['av_gmap_0']['maptype_id'] = ""; /* ]]> */</script>
and this code is completely missing on your website. Unfortunately you can’t simply fix this by adding this code to the child theme functions.php file because it’s generated dynamically for each map element based on your map settings (styling of the map, coordinates, marker image, etc.).
Best regards,
DudeAugust 20, 2018 at 1:19 pm #999337Back from holidays.
Problem still not solved. When I deactivate the Progress map plugin, enfold maps still don’t show up!
Please, I need further help!
Dennis
August 23, 2018 at 5:44 am #1000581Hi,
I created a test page and the map works fine but it is still not working on the “Apartment” page. This could be because of a custom code or conflict with another element. Please re-create the page add one element at a time save and refresh to know which element is blocking the google maps.
NOTE: Please make sure the address entered is correct.
Best regards,
VinayAugust 27, 2018 at 3:55 pm #1002327Hi,
I found the problem, but idk why it is a problem. I had to deselect the custom post type category. So every post in the cpt is now without a category.
Can you imagine why?
Dennis
August 29, 2018 at 2:58 am #1002939 -
AuthorPosts
- You must be logged in to reply to this topic.