Google Maps causing JS error (though map is disabled)

Home Forums Calendar Products Community Events Google Maps causing JS error (though map is disabled)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1019677
    Tim
    Participant

    [ Seems to be the same issue as: https://theeventscalendar.com/support/forums/topic/pro-version-creating-a-jquery-error/ ]

    Hello! I’ve got TEC Pro running on a site here: http://ashburnhampenhurst.samwakeling.com/events/2015-11/ and it was working well until I noticed today that a Google Maps script (main.js:16) is throwing an error: “Uncaught InvalidValueError: not an Object”

    I think this is making the rest of the page’s JS to fail and the mobile calendar then doesn’t show events when you tap a day, or change the day titles to short form names.

    I don’t even need Google Maps, and have the ‘Enable Google Maps’ checkbox empty.

    Any ideas?

    Thanks

    #1019891
    Cliff
    Member

    Hi Sam. Sorry to hear about that issue. Thanks for reaching out to us about this.

    I’m not getting the same issue on my test installation so there may be a conflict. There could be quite a few things that would lead to a plugin or theme conflict.

    Would you mind enabling WP_DEBUG and sharing any PHP errors you see while navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket?

    Once you share your WP_DEBUG findings, we may be able to get an idea of any plugin or theme conflicts.

    Please enable WP_DEBUG on your site. You’ll need to edit to your site’s wp-config.php file and change this line of code: define('WP_DEBUG', false); to this: define('WP_DEBUG', true);
    (or add this line of code if you can’t find mention of ‘WP_DEBUG’ in your wp-config.php file)

    If any errors do appear while navigating your site’s pages, please copy and paste them in their entirety into a new ticket reply — along with the URL of where you saw the error(s) — and make sure you set it as a Private reply.

    Let us know what you find. 🙂

    #1019942
    Tim
    Participant

    This reply is private.

    #1020124
    Cliff
    Member

    Sam, that script is enqueued here: /wp-content/plugins/events-calendar-pro/src/Tribe/Asset/Ajax_Maps.php

    You can use this snippet to force it to not load:

    to force it to not load: https://gist.github.com/cliffordp/2c3412b0873843ffcfca

    Let me know if it gets working for you.

    Note: This would be a temporary fix as I’ve confirmed it as a bug with our developers. However, please make sure you’re using the latest version of the plugins, available here: https://theeventscalendar.com/my-account/downloads/

    #1020647
    Tim
    Participant

    This reply is private.

    #1021063
    Cliff
    Member

    Sam, I reported the issue but upon further testing it turned out to NOT be a bug in the current version of the plugins. Instead, with all those map settings disabled, my testing was still loading that script due to browser caching.

    So just make sure you have the latest version of all Modern Tribe plugins and it should work correctly.

    To get the script to not display:

    • Settings -> General -> Enable Google Maps is unchecked
    • Settings -> Display -> Enable event views -> “Map” is unchecked
    • and on that same page “Hide location search” is checked

    Have a good one!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Google Maps causing JS error (though map is disabled)’ is closed to new replies.