Bug in get_recurring_events_for_date (?)

Home Forums Calendar Products Events Calendar PRO Bug in get_recurring_events_for_date (?)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1094592
    Chris
    Participant

    If I have a number of recurring events, and I look at the first event (technically, the ‘post parent’), the time of the event is not shown. If I look at one of the following dates, the time is shown correctly.

    I narrowed it down to what’s happening in Tribe__Events__Pro__Recurrence__Single_Event_Overrides::get_recurring_events_for_date.
    Here, if event X does not have a post_parent (is the ‘main’ event), the function queries all events which have post X as parent, but also occur on the same date as X. This seems somewhat odd.

    For my situation, I fixed it with the following:

        $args = array(
          'start_date' => tribe_beginning_of_day( $date ),
          'end_date' => tribe_end_of_day( $date ),
          'post_status' => $post_status,
          'tribeHideRecurrence' => false,
        );
    
        if ( empty( $event->post_parent ) ) {
          $args['p'] = $event->ID;
        }
        else {
          $args['post_parent'] = $event->post_parent;
        }

    Please inform us if the described behavior is as expected or if you have some other fix for me. Thanks!

    #1094596
    Brian
    Member

    Hi,

    It is indeed a bug and we have a fix coming out in 4.1.1, which will be out later this week if all goes to plan.

    Cheers

    #1100853
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Bug in get_recurring_events_for_date (?)’ is closed to new replies.