Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1009701

    HI
    I have a lot of maps on my site, and I am suddenly getting this error on all of them:

    Error: In order for WP Google Maps to work, jQuery must be installed. A check was done and jQuery was not present. Please see the jQuery troubleshooting section of our site for more information.

    I tried their troubleshooting by putting this code into my header.php
    <?php wp_enqueue_script("jquery"); ?>
    but that did not change anything.

    I can’t find any other settings – there is something in the google maps plugin I am using that allows it to override the jquery, but that also didn’t work. Can you see what the trouble is? I have not seen this before, and have not changed anything that would have to do with the maps.
    thanks
    Nancy

    • This topic was modified 6 years, 2 months ago by Munford.
    #1009714

    Hey Munford,

    Have you tried disabling all active plugins to see if the issue resolves?

    Best regards,
    Jordan Shannon

    #1009724

    Hi JOrdan,
    No, I have a lot of plugins…I will test it a bit. This just happened with no new plugins or settings changed.
    thanks
    Nancy

    #1009894

    I got this message from google maps support:
    It appears that the minification of scripts on the site is causing jQuery to load too late for the maps scripts to function properly. Please try disabling minification to see if that fixes it.

    Not sure where those setting are though…
    can you take a look?
    thanks
    Nancy

    #1010068

    Hi,

    I deactivated the javascript compression option on your website (Enfold > Theme Options > Performance) but the error is still there. However jquery is loaded in the head section for sure, also all Enfold javascripts (which also use the default wordpress jquery version) work just fine. I’m pretty sure it’s not a jquery issue. Also the console outputs following error:

    
    wp-google-maps.min.js?ver=7.10.33:1 Uncaught ReferenceError: google is not defined
        at wp-google-maps.min.js?ver=7.10.33:1
    

    If it’s a jquery issue the error message would be “jquery not defined” or so.

    Best regards,
    Peter

    #1010114

    thanks for your help….
    ok so…what can I do?
    google map support keeps saying: You may want to try disabling Combine JS.

    but you looked at that.
    confused
    Nancy

    #1010117

    Hi,
    I checked the website again – jquery is loaded at the top on line 104. It’s not combined with other scripts.

    You can also try another plugin like: https://wordpress.org/plugins/leaflet-map/ – I use it on my websites and it works really well.

    Best regards,
    Peter

    #1010125

    do you think it’s a plugin failure? We have hundreds of maps so the idea of rebuilding them all in another plugin is not too attractive.
    thanks for your help
    Nancy

    #1010130

    Hi,

    I’m not sure if it’s a plugin failure but it’s not a jquery issue because jquery is loaded before the google maps js code.

    Best regards,
    Dude

    #1011217

    HI again

    so after trouble shooting I figured out the conflict (and error with some dynamic text code/conditional fields on the contact form 7 on many pages).

    I am now seeing the error “You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.” I have the API key in the enfold theme options already, so I thought I could turn that off the “Do not load the Google Maps API (Only check this if your theme loads the Google Maps API by default)” in the google map plugin settings, but then the maps disappear again with that jquery error (even though the jquery is loading fine.)

    What are the best practices here? Should I ignore the multiple API warning?
    And I still see the jquery error loading on the page below before the map loads, so there is still something weird going on.
    thanks for your help as always,

    Nancy

    • This reply was modified 6 years, 2 months ago by Munford.
    #1011297

    Hi,

    I’d ignore these warning as long as the maps are displayed.

    And I still see the jquery error loading on the page below before the map loads, so there is still something weird going on.

    I think this is some sort of fallback screen which is always visible before the map is fully loaded. After the map loaded it covers the fallback message.

    You can also add this code to the child theme functions.php to deactivate the theme maps api:

    
    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) {
    	$prohibited = true;
    	return $prohibited;
    }
    

    It may break the theme maps – so be careful and check if the theme maps work afterwards.

    Best regards,
    Peter

    #1011391

    HI
    thanks
    there was an issue that the API I had in the plugin was different than the one in the theme settings, but even after updating that I am still seeing the “multiple API” error
    – I think I will just leave it as it is for now.
    best
    Nancy

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