Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same here.

    Same here…

    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.

Viewing 4 replies - 1 through 4 (of 4 total)