Home › Forums › Calendar Products › Events Calendar PRO › Recurring events auto-creation (take 2)
- This topic has 22 replies, 2 voices, and was last updated 8 years, 6 months ago by
William.
-
AuthorPosts
-
September 20, 2017 at 8:32 am #1351922
William
ParticipantOK. Couldn’t get the host to up the max_execution time, but I did try it on my machine with xampp. Still no dice.
Upon further investigation, I noticed that there are recurring posts that refuse to load in the browser (from the “edit event” dashboard, not on the front end). If they won’t load to edit, and time out the browser, the same thing is probably happening with the cron, right?
The recurring posts this happens with tend to be older and recurring indefinitely. One solution is to trash any event this happens with and reenter all the info. Quite tedious, especially since I can’t tell from the admin screen which recurring events were entered to recur indefinitely (and should still be generating new events) and which were entered to recur for a limited period of time (so they can’t be causing any problems now). But that wouldn’t explain why we had this problem in the first place so who knows if it would happen again.
I corresponded with the host and was told there was a particular error that showed up when the edit post screen got bogged down, which could be relevant:
PHP Warning: Invalid argument supplied for foreach() in /nas/content/live/upcal/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1403.
The support tech also said: “It does also reference the recurrence of the plugin, so should be directly related.”
I provided a database file for testing previously. I could let you know some of the particular events this happens with so you can see it in action. Since we have a staging site, I could just make an account for you, if that’s faster. I would like to figure out why some of these events can’t load.
September 21, 2017 at 2:54 am #1352471Andras
KeymasterHi William,
Those are great findings!!! I know what the issue is.
Around version 4.4 or Events Calendar Pro we have changed how recurring events are handled in the background. Afterwards we pushed out more fixes for this so that as many recurring events can be ported to the new system. Unfortunately there are still a handful of events, or rather rules that cannot be ported, mainly custom recurrence rules.
These events usually lead to the result you have shared with me above. And unfortunately the only solution is to delete those events and re-create them. Unfortunately there is no other way.
One way of solving this would be importing the database into an installation that has versions before 4.4. Then you could check how the events are set up. (Though I’m not sure how the recurring events created after 4.4 would behave there.)
Other way is checking the events that were created before version 4.4. It was released this January, so any event that has a ‘post_date’ in the wp_posts table prior to that was created before.
I’ll try to check your database as well and will get back to you with my findings soon. I’m just having issues importing it due to the large size. 🙂 One thing you can help me with still is, I see different table prefixes: wp_pmxe, wp_pmxi, wp_.
Which one is the true one?
Thanks!
AndrasSeptember 21, 2017 at 3:50 am #1352481Andras
KeymasterSo I ran this on the database to list events before 4.4.
`SELECT * FROM ‘wp_posts’ where post_type=”tribe_events”
AND post_date<=”2017-01-09″
ORDER BY ‘wp_posts’.’post_date’ ASC`Gave me 652 events. Possibly not all are faulty, as there can be non-recurring events in there and recurring events that were properly ported.
There still might be some after that date, depending on when the plugin was updated.
Can be a start.
Andras
September 21, 2017 at 4:41 am #1352494Andras
KeymasterI just checked couple events in 2016.
Events that have lots of exclusion rules that likely you (or the admin) didn’t put in there are also faulty. Exclusions shouldn’t be generated like this.
Here’s an example: https://cloudup.com/cbjYqdCw9dt
Likely those events would also need to be re-created.
A.
September 21, 2017 at 5:37 am #1352530William
ParticipantThanks for the diagnostics! 🙂
On the exclusions, I noticed that before and it seemed odd, or at least inelegant. Do you think this was being caused by the same thing, events entered before the update?
Is it possible to sort events by whether they recur indefinitely? A lot of the older recurring events are events whose time has come and gone, so they could be deleted, while any of the ones that should still be recurring could be reentered. (Going forward that would be useful anyway just for deleting old events as a batch without worrying about removing something that should still be going.)
September 22, 2017 at 3:47 am #1353290Andras
KeymasterYes, I believe the exclusions were caused by the same thing.
Unfortunately I don’t know of an easy way to sort events like that. However what you can try is…
I see you are using Advanced Post Manger. Set an active filter that will only show you recurring events.
Then click on the table header ‘Title’ so you order all the listed events by title. This will group the instances of recurring events together.
Check the last instance of a recurring event, when was it. If it is way in the past, and the recurrence pattern suggests it will not happen in the future, then you can delete it.
Here’s a screenshot of an event like that which I found.
Meanwhile I’ll also check with the team if someone has an idea of the filtering you are looking for.
Andras
October 14, 2017 at 9:35 am #1363701Support 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 auto-creation (take 2)’ is closed to new replies.
