-
AuthorPosts
-
July 11, 2018 at 4:30 am #983991
Hi Kriesi Team,
I am using real estate manager plugin (https://wordpress.org/plugins/real-estate-manager/) with your theme. I am running into problems with the Google Maps API. I am using one API Key for Enfold theme and another API Key for that plugin.
In developer console I got the errors “You have included the Google Maps API multiple times on this page. This may cause unexpected errors.” and furthermore “3 Uncaught TypeError”.
I wrote the real estate manager plugin support and get the following answer: Hi, this issue is related to enfold theme. Please ask theme developers to disable google maps on properties in admin.
I don’t have any clue where to disable google maps on properties. Please could you check that for me?
I provided you an admin access in private content.
Cheers
- This topic was modified 6 years, 3 months ago by PropertiesAway.
July 11, 2018 at 5:04 am #984006Hey Ralf,
Thanks for the update.
Where can we see the issue? The map works properly on one of the real estate posts. ( see private field )
You can set the Enfold > Performance > “Disabling of template builder elements” to load only used elements.
Best regards,
IsmaelJuly 11, 2018 at 5:27 am #984025Hi Ismael,
thanks for quick reply. It is a backend related issue. Normally in Backend we can drag the map marker on the right location, but marker is invisible and did not work properly. Could you please use credentials and log-in for a short check?
You can set the Enfold > Performance > “Disabling of template builder elements” to load only used elements.
I don’t want to disable map element as we use it on homepage over the footer.
Thanks for your support.
July 11, 2018 at 11:23 am #984129Hi PropertiesAway,
Probably, you need to sue the same key for both the plugin and the map that comes with Enfold, have you tried that?
Best regards,
VictoriaJuly 11, 2018 at 11:37 am #984138Hi Victoria,
yup I tried that many times before, but without any results. Now, I changed to one API Key: AIzaSyBOHN6NmEY0WsOiLCtKfSUTpxuF8pSDeVA for enfold and estate plugin and I still get the same errors in dev console.
“You have included the Google Maps API multiple times on this page and …many Uncaught TypeErrors”
Any other ideas?
Regards.
- This reply was modified 6 years, 3 months ago by PropertiesAway.
July 11, 2018 at 12:16 pm #984183Hi,
Best regards,
VictoriaJuly 11, 2018 at 12:37 pm #984195Hi Victoria,
thanks for fast update. The enfold map is and was working properly. For demonstration I disabled the estate manager plugin insert the old API key: AIzaSyAt7Qqj79qoCJaNLgfmK9ts0LVQRq1b4pg and map is shown correct in frontend. But I always get the same notification “Could not connect to Google Maps with this API Key.” in theme settings. How could that be? without any instance running?
I guess the error notification is a theme related issue. All plugins are disabled.
Regards.
July 12, 2018 at 2:31 am #984417Hi,
I’ve tried to login but I can’t edit the theme options or the custom posts. Please set the user role to admin.
Have you tried to disable the API key in the theme’s Google Services panel? Just leave it blank and then save the theme options.
The theme’s map element should still work if the plugin is actually loading the google map js API.Best regards,
IsmaelJuly 12, 2018 at 4:29 am #984454Hi Ismael,
I tried both several times. I disabled google maps element and used only one API key for both enfold and real estate manager. Same errors in dev console.
Furthermore I tried to insert the API Key only in real estate manager or enfold. Equal results map is shown but no marker and many errors in dev console.
I am very thankful for your support. I attached you new credentials in private content
Cheers.
July 13, 2018 at 8:36 am #985029Hi,
Thanks for the update.
Did you disable the “Geocoding Service API”? Please go to the project’s Google API Manager and enable the API back.
Geocoding Service: This API project is not authorized to use this API. For more information on authentication and Google Maps JavaScript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key
That is an error from the browser console.
Best regards,
IsmaelJuly 13, 2018 at 3:59 pm #985199Hi Ismael,
I created another API to ensure that Geocoding is enabled and insert it in enfold and estate manager plugin. In theme settings Google Services shows no error notification more.
But now the map on homepage is invisible and under the socket is the following error:
Warning: Invalid argument supplied for foreach() in /home/holidays/samuiholidayhomes.de/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/generic-helper.class.php on line 301
Furthermore something very strange the plugin Real Estate manager is twice installed. Can I delete one of the installations without deleting all existing properties?
Thanks for your support.
July 16, 2018 at 8:35 am #985853Hi,
I can now authenticate the API key without the error. We also disabled this filter from the functions.php file.
add_filter('avf_gmap_vars', 'avf_gmap_vars_disable', 10, 1); function avf_gmap_vars_disable($map) { if(!is_admin()) { $map = null; } return $map; }
Best regards,
IsmaelJuly 16, 2018 at 2:20 pm #985929Hi Ismael,
thanks for update and great that the enfold map is working. What is the filter good for? Now I have more errors in Listing Manager and still have the same main issue. When I want to list a property map in real estate manager no Map marker is visible.
In developer console I got the errors “You have included the Google Maps API multiple times on this page. This may cause unexpected errors.”
Do you have any idea how I can fix that?
Thanks for help.
- This reply was modified 6 years, 3 months ago by PropertiesAway.
July 17, 2018 at 3:32 am #986196Hi,
I removed the API key from the theme’s Google Services panel and then deregister every map scripts from the theme but the error is the same. The plugin or some other script is including the maps API script twice. Please contact the plugin author for additional help.
Best regards,
IsmaelJuly 17, 2018 at 4:34 am #986227Hi Ismael,
thanks for amazing support. I tried to contact the plugin developer to fix that issue and got the following answer:
Hi, this issue is related to theme. Please ask theme developers to disable google maps on properties in admin.
I will try it again and hope that will clear up the issues.
Regards.
Properties AwayJuly 18, 2018 at 2:40 am #986710Hi,
I already tried that but it didn’t fix the issue. The maps API is being loaded twice even if I disabled every instance where the theme loads it. I also dequeue every scripts related to the theme’s map element but the map API is still loaded more than nce.
//add_filter('avf_gmap_vars', 'avf_gmap_vars_disable', 10, 1); function avf_gmap_vars_disable($map) { if(!is_admin()) { $map = null; } return $map; } add_filter('avf_load_google_map_api_prohibited', 'avf_load_google_map_api_prohibited_true', 10, 1); function avf_load_google_map_api_prohibited_true($prohibited) { if( is_admin() ) $prohibited = true; return $prohibited; } add_action('wp_enqueue_scripts', 'ava_deregister_gmaps', 9999); function ava_deregister_gmaps() { if(is_admin()) { wp_deregister_script( 'avia-google-maps-api' ); wp_deregister_script( 'avia_google_maps_front_script' ); wp_deregister_script( 'avia_google_maps_api_script' ); wp_deregister_script( 'avia_google_maps_widget_admin_script' ); } }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.