Proposed Fix: Incorrect Events Calendar organizer shown in column & inline edit
I have a site using The Events Calendar Pro, and some of my events are setting their organizer ID as “0” when saved rather than leaving this value empty. Meanwhile, the current behavior of the Organizer column and inline-editor for The Events Calendar add-on has it check if the IDs are empty, but it doesn’t actually check if these IDs happen to be 0 (which shouldn’t otherwise match anything). This then had the 0 ID being parsed using the previous event’s details for the eventual unexpected result.
My fix is quick & easy.
First, edit /ac-addon-events-calendar/classes/Column/Event/Organizer.php (column output) so that:
if ( ! $post_ids ) {
is instead:
if ( ! $post_ids || $post_ids[0] == 0 ) {
Then, edit /ac-addon-events-calendar/classes/Editing/Event/Organizer.php (inline editor output) so that:
if ( ! $ids ) {
is instead:
if ( ! $ids || $ids[0] == 0 ) {
This fixes the issue entirely! I’d love to see this fix officially implemented as this is a standard site using The Events Calendar as expected with this one bug happening when it could be easily avoided moving forward.
Thanks for the great plugin!
You must be logged in to reply to this topic.