"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 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1155172
    Barry
    Participant

    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!

    #1155632
    Cliff
    Member

    Hi 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.

    #1159294
    Barry
    Participant

    The 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.
    #1159590
    Cliff
    Member

    I 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.

    #1160351
    Barry
    Participant

    This reply is private.

    #1160626
    Cliff
    Member

    I 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?

    #1160980
    Barry
    Participant

    Here’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
    )

    #1161177
    Cliff
    Member

    Ah 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.

    #1188728
    Nico
    Member

    Hey 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,
    Nico

    #1199132
    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 10 posts - 1 through 10 (of 10 total)
  • The topic ‘"tribe_get_recurrence_start_dates" Not working as Expected’ is closed to new replies.