Forum Replies Created
-
AuthorPosts
-
if we are talking about Enfold 4.5x the correct solution:
add_filter( ‘avf_load_google_map_api_prohibited’, ‘__return_true’ );
reference in class-gmaps.php line 141
This disables all googlemap scripts handles frontend: avia_google_maps_front_script and backend: avia-google-maps-api, avia_google_maps_api_script
March 31, 2017 at 6:51 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #770132yes, then its not disabled.
March 31, 2017 at 6:26 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #770121If you disable the Enfold Google Maps Api function the api key you put in the Enfold-Admin section is useless or has no effect. You can leave it there or not it has no effect. Enfold is not calling anymore the google.maps.js script.
You can check:
1) Browser Console -> is google maps api called or not?
2) Source: Search for the script
If you find the script 1x it should be ok, if you find it twice then you have not disabled the Enfold Map API.March 31, 2017 at 2:51 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #769974to get googlemap working you have to include the google map api.js ONCE only. So just make sure, that’s the case , by looking in your sourcecode (both admin-logged in and as frontend user) to make sure there is always only one <script>…. </script> with the google map .js file.
When ENFOLD map api is disabled, the js file has to included by your plugin or you use WP enqueue script in function.php to include it by yourself (which I would recommend to do).March 20, 2017 at 9:38 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #763813I did not test the solution provided by ENFOLD support which is nothing else then switch off the API completely with also effects the frontend.
The “solution” I proposed was a simple hack to avoid the backend problem (if you a plugin which also uses the maps for backend processes) but leaves the frontend untouched. It will get overwritten if you install an update of the theme though.March 20, 2017 at 9:22 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #763806sure, without the js. lib the google map is not working. But if you embed the google maps.js api on your own in your wp installation, it should work.
March 7, 2017 at 4:46 am in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #756718it is not a very good solution since it disables a core function of ENFOLD and these changes will be lost on a theme update. A far better approach would be a revise of google map (admin) functionalities by ENFOLD. Since popularity of the theme is growing there are more people out there using ENFOLD as base theme for customization – so am I one of those.
March 6, 2017 at 8:31 pm in reply to: How to solve a conflict b/t enfold google maps api calls (on front & backend) #756578yes, I run into the same kind of problem – in my case a conflict between Enfold and Meta-Box Map Field in the admin backend – only in the backend, the frontend does not have this issue.
#1 open this file in your theme folder: wp-content/themes/enfold/framework/php/class-framework-widgets.php
#2 at around line 1311 you find this: wp_register_script( ‘avia-google-maps-api’, $api_url, array(‘jquery’), NULL, true);
#3 replace this line with: // wp_register_script( ‘avia-google-maps-api’, $api_url, array(‘jquery’), NULL, true);
(out commented)this will prevent Enfold from adding the javascript maps.google.js to the code when you are logged in.
[SOLVED]
@ENFOLD: check the handler for conflicts with plugins using google.map calls and update the versioning of this javascript call. You are using v3.27 for Enfold 3.8. The current googlemap.js is >4.7.! -
AuthorPosts