Viewing 30 posts - 1 through 30 (of 31 total)
  • Author
    Posts
  • #750733

    I am using this plugin:
    http://codespacing.com/wordpress-plugins/progress-map-list-and-filter-wordpress-plugin/

    I am unable to get the plugin to work as I wish due to a conflict between the google maps api calls of the plugin as well as those of the enfold theme.

    I have exhausted Google search seeking a solution to this issue…none of the solutions seem to work:
    https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=enfold+disable+google+maps+apis

    Even when I add a suggested line of code to my child theme’s functions file, it still does not disable the front end. I know because I test it manually by deleting the google api key from the enfold theme and every map stops working.

    My ideal solution: disable all google maps api calls from both the frontend and the backend by the enfold theme, using a function in the child theme functions.php file.

    #751033

    I managed to eliminate one or two js conflicts but I have not been able to entirely eliminate the API calls by Enfold (at least on the frontend).

    I continue to test this by removing the google maps API key from the enfold optons menu (listed in the private content area)

    Current code in the child functions file:
    add_filter(‘avia-google-maps-api’, ‘__return_false’, 10, 2);
    add_filter( ‘avf_load_google_map_api’, ‘__return_false’ );

    /* remove google map api calls */
    add_filter(‘avf_load_google_map_api’, ‘disable_google_map_api’, 10, 1);
    function disable_google_map_api($load_google_map_api) {
    $load_google_map_api = false;
    return $load_google_map_api;
    }

    #751682

    Bump

    #751838

    Echo

    #752026

    Hey!

    Please contact the Plugin developer to help you, if you need that.
    We can not offer third party compatibility.

    Thank yu for your understanding

    Cheers!
    Basilis

    #752104

    I did not ask you to provide any third party compatibility.

    I specifically requested code to disable all google maps api calls on the front end. I have found plenty of your support staff offering it in other threads, but that code was not working for me as evidenced when the maps would stop working when I would removed the map key from enfold. In theory, if totally disabled, then the maps should not work regardless of whether there is a google map key in enfold or not.

    #753903

    Support? Please help

    I need to know how to disable all google maps api functionality from the enfold theme.

    #754186

    Hi,

    Can you try to remove these codes in functions.php:

    add_filter(‘avia-google-maps-api’, ‘__return_false’, 10, 2);
    add_filter( ‘avf_load_google_map_api’, ‘__return_false’ );
    
    /* remove google map api calls */
    add_filter(‘avf_load_google_map_api’, ‘disable_google_map_api’, 10, 1);
    function disable_google_map_api($load_google_map_api) {
    $load_google_map_api = false;
    return $load_google_map_api;
    }

    and replace it with:

    add_filter( 'avf_load_google_map_api', '__return_false' );

    you will notice it’s the same with:

    add_filter( ‘avf_load_google_map_api’, ‘__return_false’ );

    however I have encountered some issues where the single quote ‘ is changed for some reason that’s why the code isn’t working.

    Best regards,
    Nikko

    #754205

    I changed what you wanted me to change, then removed this API code (see private content) from the ENFOLD –> Google Services area:

    I am still getting a conflict. Can you tell me what the code above actually does?

    #755989

    Any ideas?

    #756578

    yes, 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.!

    #756598

    Hi!

    Let us know if that solution does work out for you.
    Thank you very much for sharing

    Best regards,
    Basilis

    #756718

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

    #759871

    Hey!

    @guido: The filter above should do the same thing like your modification. It will disable theme’s default map api.

    add_filter( 'avf_load_google_map_api', '__return_false' );
    

    If this is not working, use this:

    add_action('after_setup_theme', 'ava_disable_gmap');
    function ava_disable_gmap() {
    	add_filter('avf_load_google_map_api', function($load_google_map_api) {
    		$load_google_map_api = false;
    		return $load_google_map_api;
    	},10,1);
    
    	add_filter('avia_google_maps_widget_load_api', function($load_google_map_api) {
    		$load_google_map_api = false;
    		return $load_google_map_api;
    	},10,1);
    }

    Regards,
    Ismael

    #763516

    I really wish I could say that either of the codes you shared work. Unfortunately, I need more help. I do not think this is working. I am including details in the private content area.

    In a nutshell, I implemented your code and tested it by removing the API key for google api in the enfold admin panel. Doing that stops my maps from working.

    #763806

    sure, 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.

    #763808

    Is there truly a way to disable Enfold’s google map api calls using the filters provided above? Thus far, I can’t get them to work.

    I believe you found a way to make it work by modifying files that would get overwritten in a theme update and that as you pointed out is not an ideal solution.

    I continue to post here to get some insights from Kriesi support on this issue.

    #763813

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

    #763814

    I may need to explore your hack.

    The plugin I use makes calls from both the backend and the frontend.

    #765894

    Hi,

    In a nutshell, I implemented your code and tested it by removing the API key for google api in the enfold admin panel. Doing that stops my maps from working.

    Isn’t that the purpose of the filter? It will disable the google map api hence disabling the google map element and removing the conflict from another source such as a plugin.

    Best regards,
    Ismael

    #769700

    Hi Ismael,
    Thank you, but the other map solution should takeover and work at the point you disable enfold. Any ideas?

    #769730

    Hi!

    I’m sorry but what “other map solution”? The purpose of the filter that we provided above is to disable the theme’s google map api. Please note that the theme’s map element is not going to work after adding the filter. Are you still planning to use the theme’s map element after installing another map plugin?

    Regards,
    Ismael

    #769735

    No. I am not.

    My point that I am trying to make is that the map plugin is working. I am receiving these conflicts here and there.

    I believe your code disabled the ENFOLD google map api completely, then it should be off such that when you remove the api key from the enfold admin interface it should have no impact on the display of the maps. If there was a negative impact, it should occur when the you disable the ENFOLD google map api (and not when you remove google map api key).

    Does that make sense? Or am I misunderstanding something?

    #769765

    Hey!

    The google map api key that you added in the theme options will be rendered useless or disabled once you added the filter. Does the plugin require you to add a google map api key? I’m sure it has its own option for that.

    Regards,
    Ismael

    #769974

    to 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).

    #770082

    I understand that.

    Currently, both Enfold and my map plugin use the Google map .js file.
    If Enfold google map api and .js files are completely disabled, then I should be able to remove the map API key from the Enfold backend without consequence? Meaning, the frontend should not be affected. However, this is not the case.

    The question is whether the call for the .js file is completely disabled with that code because from my experience thus far it doesnt appear to be.

    #770121

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

    #770123

    Do you agree that the Enfold google js is not disabled if I can remove the key and it impacts the site?

    #770132

    yes, then its not disabled.

    #770848

    Hi!

    Do you agree that the Enfold google js is not disabled if I can remove the key and it impacts the site?

    What happens if you remove the google api key from the theme options? Please provide a link to the page with the issue. Please note that every google map api requires a key so the map plugin that you’re using should have that option somewhere. If not, please contact the plugin author for more info.

    Best regards,
    Ismael

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