Home › Forums › Calendar Products › Events Calendar PRO › Recurring Events not being created
- This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by
Harry Hill.
-
AuthorPosts
-
August 28, 2018 at 6:56 am #1607564
Harry Hill
ParticipantI am using a custom query to output Events of a certain Category on their own page for that current week. The query is as follows:
$current_time = current_time( ‘Y-m-d’ );
// If today is a Sunday, use today. Else get the last Sunday
$sunday = ”;
if ( (string) date( ‘w’, strtotime( $current_time ) ) == ‘0’ ) {
$sunday = $current_time;
}
else {
$sunday = date( ‘Y-m-d’, strtotime( ‘last Sunday’, strtotime( $current_time ) ) );
}// If today is a Saturday, use today. Else get the next Saturday
$saturday = ”;
if ( (string) date( ‘w’, strtotime( $current_time ) ) == ‘6’ ) {
$saturday = $current_time;
}
else {
$saturday = date( ‘Y-m-d’, strtotime( ‘next Saturday’, strtotime( $current_time ) ) );
}$radio_shows = new WP_Query( array(
‘post_type’ => ‘tribe_events’,
‘posts_per_page’ => -1,
‘eventDisplay’ => ‘custom’,
‘start_date’ => $sunday . ‘ 00:00’,
‘order’ => ‘ASC’,
‘tax_query’ => array(
‘relationship’ => ‘AND’,
array(
‘taxonomy’ => ‘tribe_events_cat’,
‘field’ => ‘slug’,
‘terms’ => array( ‘radio-show’ ),
‘operator’ => ‘IN’
),
),
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘_EventStartDate’,
‘value’ => $sunday . ‘ 00:00’,
‘type’ => ‘DATETIME’,
‘compare’ => ‘>=’,
),
array(
‘key’ => ‘_EventStartDate’,
‘value’ => $saturday . ‘ 23:59’,
‘type’ => ‘DATETIME’,
‘compare’ => ‘<=’,
),
array(
‘key’ => ‘_EventHideFromUpcoming’,
‘compare’ => ‘NOT EXISTS’,
),
),
) );This code works and has for some time. However, rarely, Recurring Events seem to not be created properly and therefore do not appear in the loop. These Events have their Recurrence set to Never End and occur Weekly and to be created 1 month in advance, so every Week they should appear within this Weekly Schedule View. We opted to have them created via the Events Calendar as a Recurring Event since, as the date passes, they are Broken from the Series and a Audio Stream is added to them.
If it is noticed that a Event is missing from this view, Editing the Series and clicking “Update” seems to force it to work correctly.
Is there a known bug with Recurrence Generation that we should be aware of with multiple Recurrences needing to be calculated per day/week all at once? I am wondering if PHP is giving up at the tail end of the operation. Does it run on a Cron? Should we perhaps set up something to ping the site every hour to ensure the Recurrences are being created in smaller chunks?
August 30, 2018 at 6:04 am #1609585Victor
MemberHi Harry!
Thanks for getting in touch with us!
We apologize for a bit of delay in getting back to you. We are dealing with a high volume of threads at the moment and we are slowly getting back to normal response times.
Let help you with that issue.
There is a cron event task that is scheduled to run everyday to create/delete event instances according to the Clean up recurring events after and Create recurring events in advance for settings.
Is this functionality not working on your end?
If so, could you please share with us a screenshot of the recurring event rules (while editing the event) for one of the events you are having the problem with? We’ll try to reproduce the issue on our end and see what we can find.
Also, Could you please enable WP_DEBUG and WP_DEBUG_LOG ? This will create a debug.log file inside the /wp-content directory.
After that, try reproducing the issue a few times, so that in case there is an error, it will be saved into the debug.log file. Please share that log file with us so we can see if any problem from there.
Thanks,
VictorSeptember 4, 2018 at 8:14 am #1613054Harry Hill
Participant> Is this functionality not working on your end?
No, it does not seem to create them properly in the future and only randomly for randomly chosen Events. I have not been able to determine any sort of pattern or any misconfigurations. I have attached a screenshot with the Recurrence Rules for an Event that was reported to have not created its Future Events properly (Therefore not showing within the Query above). The Events in question within the Category for the Query all have very similar Recurrence Rules (Slight changes for Days or Time Slots, but all of them are Weekly).
I’ll set the Debug constants on Production, but I haven’t noticed anything with them active on my Local copy. If this issue pops up again I’ll be sure to check debug.log for anything funky on Production.
September 5, 2018 at 12:11 pm #1614504Victor
MemberHi Harry,
Thanks for following up with this.
I’ve just made a few tests on my end replicating the same recurring settings as your screenshot but it seems to work fine.
What happens if you edit the event and save? Does it generate the missing events correctly?
Also, while editing the event, could you please see if there are any console errors by inspecting the page? We have an article that explains how to do that here > https://theeventscalendar.com/knowledgebase/using-google-chrome-developer-tools/
Please keep us posted about any error that may be logged into your debug.log file.
Additionally, if you experience the same issue, I’d recommend you try re-creating the same recurring event under default conditions (all other plugins deactivated and using a default theme).
Thanks,
VictorSeptember 27, 2018 at 9:35 am #1632309Support Droid
KeymasterHey 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 ‘Recurring Events not being created’ is closed to new replies.
