Event-Organiser
Event-Organiser copied to clipboard
EO's time picker breaks ACF's when editing events
Both Event Organiser and ACF pro use the same time picker script but load their own different versions. On the event edit screen EO's time picker works, while ACF's does nothing on click. Page throws JS errors on load showing the timepickers conflict. JQuery Migrate Helper solves this for the time being but as I understand, this won't be possible in WP 5.7 anymore.
Hi @krays what are the errors you are seeing? If its a naming conflict I'm not sure how jQuery migrate would resolve that.
Hi, I'm also encountering this issue. I was about to report a bug but saw this ticket. This conflict appears the same way for me as it does for @krays. On the event post, I have ACF fields and two of them happen to be Time Picker fields.
Here is the error that I get:
jquery.js?ver=3.5.1:4055 Uncaught TypeError: Cannot read property 'msie' of undefined at Timepicker._generateHTML (time-picker.js?ver=3.10.4:614) at Timepicker._updateTimepicker (time-picker.js?ver=3.10.4:424) at Timepicker._setTimeFromField (time-picker.js?ver=3.10.4:1041) at Timepicker._attachTimepicker (time-picker.js?ver=3.10.4:157) at HTMLInputElement.<anonymous> (time-picker.js?ver=3.10.4:1371) at Function.each (jquery.js?ver=3.5.1:381) at jQuery.fn.init.each (jquery.js?ver=3.5.1:203) at jQuery.fn.init.$.fn.timepicker (time-picker.js?ver=3.10.4:1367) at Object.acf.newTimePicker (acf-input.js?ver=5.9.4:4427) at Child.initialize (acf-input.js?ver=5.9.4:4405)
Hovering over time-picker.js it shows the location: /wp-content/plugins/event-organiser/js/time-picker.js?ver=3.10.4
I also get several jquery-migrate warnings that are related to the same time-picker.js file.
@stephenharris - Sorry to nudge. Any guidance at all would be appreciated. Just curious if you have an idea about this or a bandaid fix I could do? I've been poking around the plugin but I'm a bit lost. I have a few sites encountering this issue. Thanks!
@rossberenson : Try commenting out "eo-time-picker" on line 170 in event-organiser-register.php (where it says "deprecated version" ;-) ). This is an ancient time-picker version that gets loaded instead of the newer one also included in EO. It worked for me :-)
@krays - THANK YOU! That worked! Hopefully, this will be updated in v3.0. I never like to edit plugins.
You're welcome :-) . This being v3.10.5 I wouldn't hold my breath. You can also deregister the script from your theme or plugin
v3 isn't over yet! v3.10.6 🤞🏻 I thought of deregistering and then re-registering it sans the dependency. We'll see...
@stephenharris - Any possible, official fix for this?