Help Desk

Maps JS errors

  • Posts: 47 Topics: 30
    | Permalink

    I don’t want to use Google Maps. I don’t have an API key set. You shouldn’t be generating an error. You shouldn’t even be calling the API! >:[

    Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
    CC.j @ util.js:246
    (anonymous) @ js?ver=4.9:145
    (anonymous) @ js?ver=4.9:61
    (anonymous) @ js?ver=4.9:59
    (anonymous) @ js?ver=4.9:61
    (anonymous) @ js?ver=4.9:121
    (anonymous) @ js?ver=4.9:59
    (anonymous) @ js?ver=4.9:121
    Yd @ js?ver=4.9:61
    Xd.oa @ js?ver=4.9:121
    (anonymous) @ stats.js:1
    js?ver=4.9:38 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
    _.Ob @ js?ver=4.9:38
    (anonymous) @ common.js:54
    (anonymous) @ common.js:198
    c @ common.js:48
    (anonymous) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fjjml.dev%2Fcalendar%2F&callback=_xdc_._la1bpj&token=68558:1

    Posts: 2496
    | Permalink

    Hi there,

    Sorry you are having issues with Google maps.

    If you would like to remove it completely, you can add the following to your functions.php file in your theme.

    function remove_events_map_apis() {
        wp_dequeue_script( 'tribe_events_google_maps_api' );
        wp_dequeue_script( 'tribe_events_embedded_map' );
        wp_dequeue_script( 'tribe-gmaps' );
        wp_dequeue_script( 'tribe-events-pro-geoloc' );
    }
    add_action( 'wp_print_scripts', 'remove_events_map_apis' );
    

    Let me know if this works for you.

    Thanks,
    Brendan

    Posts: 47 Topics: 30
    | Permalink

    That does not work. The scripts are still loaded, and the errors still appear.

    Posts: 2496
    | Permalink

    Hi Greg,

    Try adding a higher priority to the action. I have modified the above script to include a higher priority.

    function remove_events_map_apis() {
    wp_dequeue_script( 'tribe_events_google_maps_api' );
    wp_dequeue_script( 'tribe_events_embedded_map' );
    wp_dequeue_script( 'tribe-gmaps' );
    wp_dequeue_script( 'tribe-events-pro-geoloc' );
    }
    add_action( 'wp_print_scripts', 'remove_events_map_apis', 100 );
    

    Let me know if that works. Also, I am submitting a bug ticket for this since this error shouldn’t be happening in the first place.

    Thanks,
    Brendan

    Posts: 47 Topics: 30
    | Permalink

    No, that doesn’t work either

    Posts: 2496
    | Permalink

    Hi Greg,

    This function should work to dequeue the Google Maps API. There could be a conflict with another plugin or in your theme. While we wait for this to be resolved, you can try and test this function following our testing for conflicts guidelines.

    Let me know how that goes.

    Thanks,
    Brendan

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink
    Posts: 6228 Topics: 17
    | Permalink

    Hi Greg!

    Just wanted to share with you that a new release of out plugins is out, including a fix for this issue.

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-29-july-2018/

    We apologize for the delay and appreciate your patience while we worked on this.

    As always, we suggest to setup a dev/staging site so you can make all plugin updates without disrupting the live site. Please update the plugins and don’t hesitate to open a new topic if anything comes up.

    Best,
    Victor

The topic ‘Maps JS errors’ is closed to new replies.