• codesmithsf

    (@codesmithsf)


    Hello – when I activate this plugin I get a Javascript error in the console Uncaught ReferenceError: jQuery is not defined at (index):52:1

    Line 52 is

    jQuery(function(jQuery){jQuery.datepicker.setDefaults({“closeText”:”Close”,”currentText”:”Today”,”monthNames”:[“January”,”February”,”March”,”April”,”May”,”June”,”July”,”August”,”September”,”October”,”November”,”December”],”monthNamesShort”:[“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”,”Nov”,”Dec”],”nextText”:”Next”,”prevText”:”Previous”,”dayNames”:[“Sunday”,”Monday”,”Tuesday”,”Wednesday”,”Thursday”,”Friday”,”Saturday”],”dayNamesShort”:[“Sun”,”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”],”dayNamesMin”:[“S”,”M”,”T”,”W”,”T”,”F”,”S”],”dateFormat”:”MM d, yy”,”firstDay”:0,”isRTL”:false});});

    That line comes after the jquery.min.js line but I guess Jquery isn’t loaded yet.

    Events Manager Version 6.4.6.4
    WP 6.4.3

Viewing 3 replies - 1 through 3 (of 3 total)
  • joneiseman

    (@joneiseman)

    Try disabling all the other plugins and switch to a default theme (e.g,. Twenty Twenty-Four) and see if this solves the problem. Then turn on one plugin at a time to see which one is causing the problem.

    Thread Starter codesmithsf

    (@codesmithsf)

    Ah thanks, I had disabled plugins but not the theme. My theme defers javascript loading. This line that gets added to the page’s HEAD section should check if jQuery is available before trying to execute it.

    jQuery(function(jQuery){jQuery.datepicker.setDefaults({“closeText”:”Close”,”currentText”:”Today”,”monthNames”:[“January”,”February”,”March”,”April”,”May”,”June”,”July”,”August”,”September”,”October”,”November”,”December”],”monthNamesShort”:[“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”,”Nov”,”Dec”],”nextText”:”Next”,”prevText”:”Previous”,”dayNames”:[“Sunday”,”Monday”,”Tuesday”,”Wednesday”,”Thursday”,”Friday”,”Saturday”],”dayNamesShort”:[“Sun”,”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”],”dayNamesMin”:[“S”,”M”,”T”,”W”,”T”,”F”,”S”],”dateFormat”:”MM d, yy”,”firstDay”:0,”isRTL”:false});});

    And why is this loading on every page and not just the Events Manager related pages?

    joneiseman

    (@joneiseman)

    Glad to hear you identified the source of the problem. I agree a check should be added and it would be better if it only loaded on Events Manager related pages. Hopefully the plugin author will read this and fix the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught ReferenceError: jQuery is not defined’ is closed to new replies.