Viewing 30 posts - 1 through 30 (of 34 total)
  • Author
    Posts
  • #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
    Dennis

    #984209

    Hey 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,
    Mike

    #984246

    Nope, didn’t work! Another solution?

    #984420

    Hi,
    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,
    Mike

    #984425

    Hi,
    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,
    Mike

    #985926

    Hi,

    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, 5 months ago by Dennis.
    #986621

    Hi,

    You cant be using the same API key, API keys are based on domain name :)

    Best regards,
    Basilis

    #986913

    Hi,

    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

    #986922

    Hi,
    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/geocoding

    Best regards,
    Mike

    #986932

    Hi Mike,

    Geocoding is enabled and was before!

    Dennis

    #987242

    Hi,
    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-billing

    Could be worth looking into.

    Best regards,
    Mike

    #987299

    Hi 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

    #987721

    Any other ideas?

    #987825

    Hi dennsen,

    Credentials did not work for me. Could you please update the credentials?

    Best regards,
    Victoria

    #987832

    here you go

    #988743

    Hi 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,
    Victoria

    #989100

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

    #989360

    Hi 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,
    Victoria

    #989761

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

    #990785

    Hi,

    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,
    Dude

    #991439

    Hi 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

    #991713

    Hi,

    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,
    Dude

    #991816

    Hi,

    Now the login works again!

    Dennis

    #992655

    Hi,

    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,
    Ismael

    #992751

    Hi 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

    #992764

    Hi,

    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,
    Dude

    #999337

    Back 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

    #1000581

    Hi,

    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,
    Vinay

    #1002327

    Hi,

    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

    #1002939

    Hi,

    That’s strange. Can you give us an example of the post without the category?

    Best regards,
    Ismael

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