• Hello, first to say how much I like the time.ly WP plugin. We do a lot of repeated events and setting them up is a breeze.

    I’m having difficulty with the plugin generating JS errors and I’m not sure why.

    I tried deactivating all other plugins and the errors did not cease and then I tried deactivating time.ly and they did.

    The problem stems from the file ai1ec_render.js receiving undefined values. Here is one example:

    ?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:108 Uncaught TypeError: Cannot read properties of undefined (reading 'affix')
        at ?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:108:2512
        at Object.execCb (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:12084)
        at n.check (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:6408)
        at n.enable (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:8835)
        at Object.enable (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:11126)
        at n.<anonymous> (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:8692)
        at ?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:800
        at each (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:328)
        at n.enable (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:8297)
        at Object.enable (?ai1ec_render_js=calendar.js&is_backend=false&is_calendar_page=true&ver=3.0.0:7:11126)

    I was wondering if you could help me troubleshoot this. You can see examples on our site.

    Many thanks

    EPC at Jampa Ling

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • After some additional troubleshooting, I have found that things improve by including in the footer all the JS created by the render_js function. I am continuing my testing but this makes me believe there is a conflict in the order in which JS is loaded so the priority may have to change for the ai1ec scripts to make it less fragile

    Further testing has shown that relegating the ai1ec_render_js script to the footer rather than the header when added with wp_enqueue_script seems to provide a consistent fix. Refer to the code in \all-in-one-event-calendar\app\controller\javascript.php at around line 763 and update false to true to force the script to the footer.

    Thread Starter epcjampaling

    (@epcjampaling)

    Thanks so much @vinjoy707 – worked a treat!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Javascript errors’ is closed to new replies.