Home › Forums › Calendar Products › Events Calendar PRO › Recurring event created 14,000 entries and they need to be deleted
- This topic has 12 replies, 4 voices, and was last updated 9 years, 11 months ago by
Mary.
-
AuthorPosts
-
May 9, 2016 at 1:43 pm #1112374
Mary
ParticipantI added an event to our calendar a while ago, probably back in January (so about 6 months ago) and I haven’t touched it until recently when all I needed to do was change the start time by 30min. That was it.
(Background info on the event: It’s a recurring event that happens every Wednesday, and is never-ending. If the recurring settings worked correctly, it should have only made enough events for two years, for a total of 104 events.)
I noticed last week on the back end that the event was listed to be happening on the same day hundreds of times, even though on our website it only came up once for that day. When I select “Edit Series,” on the next page it says that recurring data is being created in the background and that the total number of events made so far is… (get this!) 14,000!! Since the beginning of last week, that number has grown to 20,000 total recurring entries of an event.
Basically, all I want to do is clear out that event, recurring entries and all, from our calendar and add it again fresh. What is the best way to go about doing this? I don’t have 100 hours to delete each entry, and because our website is completely customized, adding plugins is a no-no too.
May 9, 2016 at 5:52 pm #1112472Hunter
ModeratorHi and welcome back,
If you visit Events > Events and hover over the first recurrence of the event giving you troubles, you should be able to select “Trash Series” – let me know if this works!
May 10, 2016 at 5:36 am #1112584Mary
ParticipantThat’s one of the issues. I cannot find the start of the series of events at all. I consistently see “Edit Series” but never “Trash Series” as I have in the past with other recurring events. Is there a good method on how to find it?
May 10, 2016 at 12:45 pm #1112874Hunter
ModeratorHey Mary,
Welcome back. You’ll need to find the first event in the series. Visit Events > Events, then search for the title of the recurring series. Navigate to the last page and at the very bottom should be the first recurrence of that event.
If that doesn’t work, I’ll reach out to my fellow team members to see if they have any insight on how to go about this. Thanks for the patience and let me know how it goes. Have a good day π
May 10, 2016 at 1:04 pm #1112892Mary
ParticipantAfter filtering by start date, it listed several hundred events for today’s date, then dates from last year, and then more events connected to the current series. I’ve located two instances of the series (they were located somewhere within the middle of the pages) that say “Trash Series” and have selected this option on both, but after only a short length of time, the page times out. I have no problem with this if it means they are being deleted in the background, but that doesn’t seem to be the case as after checking my events listings a while after doing this, the number of total events only went down by about 10. It wasn’t until I went back in, found the initial events AGAIN and selected “Trash Series” another time that it when down by a little bit more. I’ve continually been doing that to bring the number down little by little, but I am praying there is a different way to do this…
May 11, 2016 at 5:53 am #1113136Mary
ParticipantAlso, as I am trying to clear the events out, they are continuing to develop in the background, making the work I am doing to clear them out for nothing. Is there a way to stop the event from developing any further? And also another way for me to delete the event altogether, because the “Trash Series” option did not work since there are so many created.
May 11, 2016 at 9:21 am #1113251Hunter
ModeratorHey Mary,
Welcome back. Try entering a smaller numbers in the Clean up recurring events after and Create recurring events in advance for settings found in Events > Settings > General.
To delete the existing events, try a plugin such as Bulk Delete from the WP repository. Keep me updated with your progress and have a great rest of you Wednesday.
May 16, 2016 at 11:39 am #1115056Mary
ParticipantMy initial issue was resolved regarding the first event this happened to after clearing the event out by going in, finding the coding, and completely deleting it out. However, after this occurred, I took precaution by going into the few long term recurring events we have and instead of having them set as “Never-ending” I changed the end date to Dec 31, 2016. This must have had an adverse effect because now the same thing that occurred to the other event is happening to this one.
I’m wondering if there is a bug in the calendar where if the date/time data is edited on a recurring event that is set to never end, it changes it across all the already created recurrences, but also recreates the entry for those same dates, making it so there are hundreds of extra events. This is my theory, not sure if there’s any merit to it. I thought I would share however because in my forum search for issues related to mine, it seemed like there was a problem for the developers of The Events Calendar being able to recreate the issue.
May 17, 2016 at 9:30 am #1115393Hunter
ModeratorHey Mary,
Thanks for getting back to me π
I haven’t ever come across a situation where extra events were created due to changing the date/time on a recurring event that is never set to end, but there is always the possibility.
What is the status on the issue as of now? Do you have things “under control” now that the event dates have been updated and you’ve been able to clean the extra events from your database? Let me know and I’ll also do a bit more investigating to see if I can find any similar instances.
Thank you the patience and professionalism exercised on your end and have a great rest of your day!
May 17, 2016 at 11:42 am #1115528Mary
ParticipantThanks for your help. I’ve attached a look at the back end of the event that is now creating too many events. Before I changed the end date to December 31, 2016 rather than never ending, it only had 960 events created. Those are some from 2015 and then the two years forward that is set in our settings of the Event Calendar. As you can see now, it has nearly 3,000. I’ve continued to “trash series” but it is only deleting a few at a time as I said.
Is there a way for me to discontinue it from creating the recurring events in the background? If unpublish the event, will that do anything? I basically just need it to stop creating new entries so I can delete everything out.
Thank you for the help.
May 18, 2016 at 10:28 am #1116006Hunter
ModeratorMary,
I noticed you aren’t using the most recent versions of our plugins. Can you update to the latest release and create a new recurring event with the same rules you have for the event giving you troubles? Once published, let me know if the problem persists.
To answer your questions, you can trash the event and it should stop the events from being generated. Changing the end date should also work too. I’m pasting an SQL query below that deletes current recurrences and changes the recurrence pattern to prevent it from trying to recreate new events. As always, it’s recommended you backup before running any SQL queries.
/*
This SQL Query will delete all recurrences of an event, while preserving the
original event. It can delete many thousands of recurrences per second on most
servers.The query and steps below is modified version of that in this tutorial:
It is recommended that you read the source article above before proceeding.Step 1) Grab the "post_parent" ID for your recurring series of events. Navigate
to one of the recurrences in your WP Admin and click Edit Series. This will take
you to a URL like example.com/wp-admin/post.php?post=140&action=edit Grab the
post ID from this URL, in this case itβs 140.Step 2) As the article says itβs first a good idea to preview the posts you are
going to delete before deleting them. Swap out the X at the bottom of the
following query with the post ID you just grabbed, in the case above we would
make the bottom line "WHERE a.post_parent = 140" Now run the query. The results
should be many thousands of posts all with the same title, your recurring event.SELECT *
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id )
WHERE a.post_parent = xStep 3) Now run the below query, be sure to once again swap out the post_parent
ID at the bottom for the ID you grabbed earlier.Step 4) The original event which spawned the series still exists in your
WP-Admin. If you would like to delete it find it, click Trash Series, and you
are done. If you wish to instead edit its recurring rules click Edit Series and
make your modifications.*/
delete a,b,c,d
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id )
WHERE a.post_parent = xI hope this helps and let me know how things go π
June 2, 2016 at 9:35 am #1121669Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Recurring event created 14,000 entries and they need to be deleted’ is closed to new replies.
