• Resolved stephenevans

    (@stephenevans)


    Hi there,

    I am trying to add the booking calendar in to the site but it gives us many JavaScript errors with the first one being:

    Uncaught TypeError: Cannot read properties of undefined (reading ‘_getInst’)

    And then you get these on hover:

    booking-form-testing-2/:762 Uncaught TypeError: Cannot read properties of undefined (reading ‘_doMouseOver’)

    booking-form-testing-2/:762 Uncaught TypeError: Cannot read properties of undefined (reading ‘_doMouseOut’)

    I’m not sure what is causing the JavaScript to not be found because I have looked through our plugins and can’t see any that would be deferring the JavaScript.

    Thanks,
    Stephen

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    1. You are using this cache plugin: “LiteSpeed Cache”. Please deactivate it or add the exception to the page with a booking form for do not cache this page(s).
    2. Also if the issue will still exist, please recheck that your theme or some other plugin does not load the jQuery library second time, after initial loading. Find more information at this page: https://wpbookingcalendar.com/faq/loading-jquery-twice/

    Kind Regards.

    Thread Starter stephenevans

    (@stephenevans)

    Thank you for the reply.

    I have tried disabling Litespeed Cache but that didn’t seem to work so I checked the theme files for additional JQuery installations but couldn’t find any.

    Are there any other possible reasons this could be occurring?

    Thanks,
    Stephen

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    Currently when I try to open and test your webpage, I can see that it still cached. Please clear the cache and add the exception to the page with a booking form for do not cache this page. Then I can test more about other issues.

    Kind Regards.

    Thread Starter stephenevans

    (@stephenevans)

    Okay I have deactivated it again.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    At the bottom of source code of your page, you have this JavaScript loading:

    appendChild(t)}e("https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"

    Such code make loading the jQuery second time and reset all previously defined JavaScript variables. That’s why you see those JavaScript errors.

    You need to find what exactly (your theme or some other plugin) make such second loading of such jQuery library and prevent to do this. More here: https://wpbookingcalendar.com/faq/loading-jquery-twice/

    Relative to  WordPress best  practice  it is not good idea to load the JS directly in the header or footer.

    Kind Regards.

    Thread Starter stephenevans

    (@stephenevans)

    Ah I have found the code and have commented it out for now and it seems to work fine.

    Many thanks for the help,
    Stephen

    Dear,
    Have the same error. According to us, Cach is off and jquery is not loading 2 times. See https://www.vakantiehuiscalpe.be/ and then ‘Boek hier’ on the top right.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    Please clear the cache of all minimized CSS and JavaScript files. Then test it again.
    Kind Regards.

    Plugin Author wpdevelop

    (@wpdevelop)

    And can you send screenshot of how did you added the Booking Calendar shortcodes to the page ?

    Thank you.

    Thanks for your quick response.

    msg 1: we tested it on new pc and also with new private screen, nothing helped.

    Msg 2: it is hard code in theme. An acquaintance created the site but was hacked this weekend. They have now asked to check everything. Did all junk via FTP from site, then ran all updates from WP and set PHP to highest version. Also changed all passwords.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    Probably something wrong in the shortcode in your theme. Just need to check how it hard coded into your theme.

    Kind Regards.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Javascript errors causing booking calendar to break’ is closed to new replies.