Home › Forums › Calendar Products › Events Calendar PRO › Orphaned repeating calendar items
- This topic has 6 replies, 4 voices, and was last updated 9 years, 2 months ago by
Hunter.
-
AuthorPosts
-
February 10, 2017 at 2:47 pm #1233101
Austin
ParticipantI had an out of control repeating calendar item which managed to generate a daily event 24,000 times. I was able to remove the recurrence schedule and then deleted the event after it finished syncing the recurrence meta data however it only removed a few hundred events on my backend. Now I have a bunch of events I can’t edit. It just loops back to the listing page. How do I remove these orphaned events in bulk?
February 13, 2017 at 2:51 pm #1234109Hunter
ModeratorHello 🙂
Does reverting back to the default WP theme and deactivating all plugins other than ours as outlined in the Testing for conflicts guide have an impact on the behavior? Please do so and revisit your list of events on the backend to see if you can bulk delete there.
I also found this Tribe Extension you can temporarily install to delete the recurring events. If you can, please give it a shot and let me know how it works out. It’s always best to do this type of work on a test site. At the least, make a backup of your database before doing so just in case.
Have a great day and please keep me updated. Cheers!
February 16, 2017 at 9:33 am #1238847Austin
ParticipantI installed the ‘Recurring Event Cleanup Tool’ unfortunately it’s not seeing the out of control event. It’s only showing legitimate recurring events, not the 24,000 orphaned events. I assumed that’s due to the fact that the parent event is already deleted. Is there anyway through SQL I can bulk select them? It doesn’t look they are sharing any similar info. The post_parent columns are unique. Anything else which I could target which would be common in either the wp_posts or wp_postmeta table?
February 16, 2017 at 5:03 pm #1239312Brook
ParticipantHowdy Austin,
That is certainly odd that these events all share different parent IDs. I am not sure what could cause that, if the plugin is behaving all recurrences should contain the same parent.
Do they all share the same title, or slug? If you can find something that is unique to these events, and only these events, deletion should be possible.
That tool is just a fancy version of this SQL snippet:
https://gist.github.com/elimn/e5de5d2037678de0b926c307022571c5
As you can see, this SQL is basing everything on the ‘post_parent’ column in your wp_posts table. However, if you can find a different column that contains something unique to all of these events, then you can use that column instead of post_parent.
Are you comfortable enough in SQL to modify the WHERE clause of this query? If not, are you able to identify some other column which contains data unique to these events? I’ll gladly help you modify the query if so.
Cheers!
– Brook
February 18, 2017 at 1:46 pm #1241350Austin
ParticipantPerfect. Thanks for the details and the explanation. I’m still perplexed as why all of the events had different post parents as well. The post parent IDs seem to increment in a sequence. I suspect someone keep breaking the series with unique info. I was able to successfully remove my events by modifying the SQL to target a specific title rather then a post parent.
February 20, 2017 at 3:52 pm #1242508Hunter
ModeratorThank you for letting us know you’ve got things figured out and also for sharing your solution for others to learn from. Feel free to create a new thread if you have any more questions or comments and have a pleasant evening. Cheers!
-
AuthorPosts
- The topic ‘Orphaned repeating calendar items’ is closed to new replies.
