Home › Forums › Calendar Products › Events Calendar PRO › "tribe_get_recurrence_start_dates" Not working as Expected
- This topic has 10 replies, 5 voices, and was last updated 7 years, 5 months ago by Barry.
-
AuthorPosts
-
August 23, 2016 at 7:45 pm #1155172BarryParticipant
Hi there.
Trying to get all recurring start dates using “tribe_get_recurrence_start_dates” function, however it appears to not be working properly…or I am just messing something up.
See the attached image for how the recurrences are set up for this particular event.
In single-event.php (theme override), I’m using the following code to output an array of recurring start dates:
echo '<pre>'; print_r(tribe_get_recurrence_start_dates()); echo '</pre>';
The code outputs the following array:
Array
(
[0] => 2016-08-19 19:00:00
[1] => 2016-08-19 19:00:00
[2] => 2016-08-20 17:00:00
[3] => 2016-08-20 21:00:00
[4] => 2016-08-21 17:00:00
)The below array is what I expected to get:
Array
(
[0] => 2016-08-19 19:00:00
[1] => 2016-08-20 21:00:00
[2] => 2016-08-21 17:00:00
)Please let me know what I’m doing wrong.
Thanks!
August 24, 2016 at 8:41 pm #1155632CliffMemberHi Matthew. Sorry you’re experiencing this.
Please reference tribe_get_recurrence_start_dates() and if that doesn’t answer your question, I’d suggest following these troubleshooting steps:
Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?
Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.
If it is, please follow our Testing for Conflicts Guide (basically switch to TwentySixteen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.
If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG and share any PHP errors you see while changing tickets quantity, navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket.
Then, please share your System Information (while in Testing for Conflicts mode).
You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)
Let us know what you find out.
Thanks.
September 2, 2016 at 8:57 am #1159294BarryParticipantThe WP installation and plugins are all up to date. I’ve also gone through the “testing for conflicts process” to no avail.
Now in addition to the first issue, I’m seeing events with an additional 8am time on the first day of a recurring event where no 8am time was specified…????
For example, see the attached screenshot to see how an example event was set up.
Should be:
Array
(
[0] => 2016-09-02 19:00:00
[1] => 2016-09-02 21:15:00
[2] => 2016-09-03 19:00:00
[3] => 2016-09-03 21:15:00
[5] => 2016-09-04 17:30:00
[5] => 2016-09-04 19:45:00
)But instead I’m seeing:
Array
(
[0] => 2016-09-02 08:00:00 (where did this come from???)
[1] => 2016-09-02 19:00:00 (correct)
[2] => 2016-09-02 19:00:00 (duplicate time, shouldn’t be here)
[3] => 2016-09-02 19:00:00 (duplicate time, shouldn’t be here)
[4] => 2016-09-03 19:00:00 (correct)
[5] => 2016-09-03 21:15:00 (correct)
[6] => 2016-09-04 17:30:00 (correct)
[7] => 2016-09-04 19:45:00 (correct)
)Missing: 2016-09-02 21:15:00
I’m trying hard to make this plugin work – I really want it to work! – but the recurring event/ticketing limitations and issues have been very frustrating and my client is pretty ticked off at how tedious recurring events are and the lack of support for recurring event tickets. I’ve spent a ton of time trying to fix and work around these issues, but like I said; pretty frustrating.
- This reply was modified 7 years, 7 months ago by Barry.
September 2, 2016 at 9:30 pm #1159590CliffMemberI noticed the start and end times are the same: 7pm UTC-5, except for some differences for some of the occurrences within the recurrence series.
Please change the occurrences to have a duration greater than zero and see if the issue remains.
Please try changing the event to have a city timezone instead of a UTC-offset timezone.
Also, can you replicate this issue on more than one recurring event series or is it just this one?
Please also send me your system information report.
Thank you.
September 6, 2016 at 7:57 am #1160351BarryParticipantThis reply is private.
September 6, 2016 at 1:58 pm #1160626CliffMemberI tested tribe_get_recurrence_start_dates() on my localhost and it worked as expected, although I didn’t test with your timezone settings or with your event’s custom recurrence rules.
Could you please try this for an event with a simpler recurrence pattern. For example: 7pm – 8:30pm every 5th of the month starting November 5, 2016, for 12 occurrences — and see if you still get unexpected results?
September 7, 2016 at 8:59 am #1160980BarryParticipantHere’s what I get:
Array
(
[0] => 2016-11-05 07:00:00
[1] => 2016-11-05 07:00:00 (duplicate)
[2] => 2016-12-05 07:00:00
[3] => 2017-01-05 07:00:00
[4] => 2017-02-05 07:00:00
[5] => 2017-03-05 07:00:00
[6] => 2017-04-05 07:00:00
[7] => 2017-05-05 07:00:00
[8] => 2017-06-05 07:00:00
[9] => 2017-07-05 07:00:00
[10] => 2017-08-05 07:00:00
[11] => 2017-09-05 07:00:00
[12] => 2017-10-05 07:00:00
)September 7, 2016 at 1:49 pm #1161177CliffMemberAh ha. We figured out that this function/method is incorrectly including Revisions. (screenshot)
I’ve reported the bug to our developers, and I marked this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.
I apologize for this issue and appreciate your understanding and patience.
November 7, 2016 at 10:34 am #1188728NicoMemberHey Matthew,
Just wanted to let you know that this issue was fixed in maintenance release 4.3.1. This went out two weeks ago aprox, sorry for the delay in the heads-up!
Please let me know if updating makes this right,
Best,
NicoNovember 29, 2016 at 8:35 am #1199132Support 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.