"tribe_get_recurrence_start_dates" Not working as Expected

Home Forums Calendar Products Events Calendar PRO "tribe_get_recurrence_start_dates" Not working as Expected

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1199529
    Barry
    Participant

    This function is not returning all start times.

    For example, see the attached screenshot for an event’s recurrence rules setup.

    When I run the function “tribe_get_recurrence_start_dates”, I EXPECT the following array:

    Array
    (
    [0] => 2016-12-02 19:00:00
    [1] => 2016-12-02 21:15:00
    [2] => 2016-12-03 19:00:00
    [3] => 2016-12-03 21:15:00
    [4] => 2016-12-04 18:30:00
    [5] => 2016-12-04 20:45:00
    )

    Instead, the following is the actual result returned:

    Array
    (
    [0] => 2016-12-02 19:00:00
    [1] => 2016-12-03 19:00:00
    [2] => 2016-12-03 21:15:00
    [3] => 2016-12-04 18:30:00
    )

    Please help.

    #1199830
    Barry
    Participant

    After looking into this issue further, it doesn’t appear to have anything to do with the “tribe_get_recurrence_start_dates” function. Rather it has to do with how the recurrence instances are being saved to the database.

    I’ve looked at and tested several recurring events. Some are save properly to the database. Others do not.

    There appears to be an issue with multiple recurrences on the first and last day of a recurring event.

    #1200753
    Brook
    Participant

    Howdy Matthew,

    Thanks for reaching out. I would love to help you with this.

    When you have a recurring event the calendar does not start recurrences until after the first day has passed. So if you start on event on Friday, and setup a recurrences for Friday, it will not recur until the next Friday. This explains your missing event from Dec 2nd. The missing event on Sunday is likely due to your end date not also being the 6th.

    To be up front, we did not even mean to introduce multiple recurrences in the same day. It’s a paradigm that requires rethinking a decent amount of our recurrence code. This feature was accidentally introduced when we added support for recurrences at different times. It was a failure on our part, but at the time we did not realize people would be using this to have multiple recurrences on the same day. And so we are working to add functionality here, but at the moment there are certainly oddities.

    You have faced one such oddity. Having subsequent recurrences only happen if the day was different than the original made sense when you could not do same day recurrences. Now that you can though, this purposeful behavior is now odd and not what people expect.

    While we work to flesh this accidental feature out, the best workaround I can offer you is to break your series up into multiple events, one for each time that it occurs.

    I wish I had better news here. Please let me know if you have any questions or need clarification on any of this. Cheers!

    – Brook

    #1210267
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘"tribe_get_recurrence_start_dates" Not working as Expected’ is closed to new replies.