Home › Forums › Calendar Products › Events Calendar PRO › "tribe_get_recurrence_start_dates" Not working as Expected
- This topic has 4 replies, 4 voices, and was last updated 7 years, 3 months ago by Barry.
-
AuthorPosts
-
November 29, 2016 at 5:47 pm #1199529BarryParticipant
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.
November 30, 2016 at 9:09 am #1199830BarryParticipantAfter 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.
December 2, 2016 at 3:49 am #1200753BrookParticipantHowdy 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
December 24, 2016 at 8:35 am #1210267Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘"tribe_get_recurrence_start_dates" Not working as Expected’ is closed to new replies.