• Resolved etbassler

    (@etbassler)


    With the update of WordPress to 4.8.2 and The Event Calendar to 4.6, I now have an issue where events with an end date beyond what is visible on the month view do not show up, though they still do in the list view.

    For instance, the October 2017 month view actually shows the dates until Nov. 5th so an event starting in October (or earlier) will not show up in the October month view unless the end date is Nov. 6th or later.

    I tried reverting to an earlier version of The Event Calendar but that was broken because of the WordPress update. Likewise, I tested this using several different themes and it had the same issue so it does not appear to be a theme-related issue.

    Obviously, these events are multi-day events as any single-day event would not end in a different month.

    Any help would be greatly appreciated.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • I can confirm this and happily solved it just half an hour ago ??

    Change src/Tribe/Template/Month.php, line 555.
    old:

    $events_request = “SELECT tribe_event_start.post_id as ID,
    tribe_event_start.meta_value as EventStartDate,
    tribe_event_end_date.meta_value as EventEndDate
    FROM $wpdb->postmeta AS tribe_event_start
    LEFT JOIN $wpdb->posts ON tribe_event_start.post_id = $wpdb->posts.ID
    LEFT JOIN $wpdb->postmeta as tribe_event_end_date ON ( tribe_event_start.post_id = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDate’ )
    WHERE $ignore_hidden_events_AND tribe_event_start.meta_key = ‘_EventStartDate’
    AND (
    (
    tribe_event_start.meta_value >= ‘{$start_date_sql}’
    AND tribe_event_start.meta_value <= ‘{$end_date_sql}’
    )
    OR (
    tribe_event_start.meta_value <= ‘{$start_date_sql}’
    AND tribe_event_end_date.meta_value >= ‘{$end_date_sql}’
    )
    OR (
    tribe_event_start.meta_value >= ‘{$start_date_sql}’
    AND tribe_event_start.meta_value <= ‘{$end_date_sql}’
    )
    )
    AND $wpdb->posts.post_status IN(‘$post_stati’)
    ORDER BY $wpdb->posts.menu_order ASC, DATE(tribe_event_start.meta_value) ASC, TIME(tribe_event_start.meta_value) ASC;
    “;

    new:

    $events_request = “SELECT tribe_event_start.post_id as ID,
    tribe_event_start.meta_value as EventStartDate,
    tribe_event_end_date.meta_value as EventEndDate
    FROM $wpdb->postmeta AS tribe_event_start
    LEFT JOIN $wpdb->posts ON tribe_event_start.post_id = $wpdb->posts.ID
    LEFT JOIN $wpdb->postmeta as tribe_event_end_date ON ( tribe_event_start.post_id = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDate’ )
    WHERE $ignore_hidden_events_AND tribe_event_start.meta_key = ‘_EventStartDate’
    AND (
    (
    tribe_event_start.meta_value >= ‘{$start_date_sql}’
    AND tribe_event_start.meta_value <= ‘{$end_date_sql}’
    )
    OR (
    tribe_event_end_date.meta_value >= ‘{$start_date_sql}’
    AND tribe_event_end_date.meta_value <= ‘{$end_date_sql}’
    )
    OR (
    tribe_event_start.meta_value <= ‘{$start_date_sql}’
    AND tribe_event_end_date.meta_value >= ‘{$end_date_sql}’
    )
    )
    AND $wpdb->posts.post_status IN(‘$post_stati’)
    ORDER BY $wpdb->posts.menu_order ASC, DATE(tribe_event_start.meta_value) ASC, TIME(tribe_event_start.meta_value) ASC;
    “;

    The original code seems to be senseless, as

    tribe_event_start.meta_value >= ‘{$start_date_sql}’
    AND tribe_event_start.meta_value <= ‘{$end_date_sql}’

    is twice in sql-statement.

    Thread Starter etbassler

    (@etbassler)

    That fixes it on my local site and I didn’t come across any issues in other places where this plugin is implemented. Thank you!

    Hopefully this will be included in a patch soon.

    Barry

    (@barryhughes-1)

    We’re aware and will fix this as soon as we can. Thanks for the note and our apologies for any inconvenience in the meantime ??

    Thread Starter etbassler

    (@etbassler)

    @barryhughes-1 Thank you for your response.

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @etbassler,

    Our latest update to the plugin was just released, and includes a fix for this issue.

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Events missing on Month view’ is closed to new replies.