Out of Control Recurring Events Won't Delete

Home Forums Calendar Products Events Calendar PRO Out of Control Recurring Events Won't Delete

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1239261
    Susan
    Participant

    Somehow we generated over 75,000 bogus recurring events! They seem to contain no actual data and won’t delete. The majority display ‘(no title)’ as the title, the current date as the start and end dates, and no other info. Some list the title as ‘Unnamed Venue’, all else the same.

    Each bogus event seems to have a unique post ID. (For obvious reasons I haven’t checked them all, but if I look at 20 they’re all different, in consecutive chunks of about 6 or 8.) When I look at the post slugs they repeat – several hundred events with identical slugs. The slugs are almost – but not quite – identical to events whose meta title was edited (through the Yoast SEO plugin) in the last week or two. An event whose slug is ‘commencement-5’ had its title edited from ‘Commencement’ to ‘2017 Commencement’ and meta title changed to Commencement – May 13, 2017, and several hundred of bogus events have the slug ‘2017-commencement’.

    When I try to delete the bogus events the wheels go around, often for a long time. I never try to delete more than 20 at a time, that always crashes. Frequently the page times out. If it resolves, there’s a message that says “X posts deleted”, but the total number of posts hasn’t changed and there’s nothing in the trash. If I check the WP Optimize page, which lists the number of posts in the trash, that also shows nothing in the trash.

    I checked the error log I have access to on the server, there are no Fatal Errors and nothing related to Tribe Events. I’m running the current versions of Tribe Events and Tribe Events Pro. I tried editing a couple of events on our local dev site to try to replicate the problem but didn’t get any. I can’t change the theme or turn off most of the plugins on the real site because it makes the site unusable.

    PLEASE, how can I delete these 75,000 entries? I can go into our DB directly if that’s the only way and I know what to look for.

    Thank you, Susan Paigen

    #1240475
    Barry
    Member

    Hi Susan,

    Thanks for contacting us — that does indeed sound pretty alarming!

    If you view the admin events list, do the duplicates show there and if you hover over the ‘edit all’ link, do you notice if they share the same post ID in the URL? For example, if the URL looks like this:

    http://example.com/wp-admin/post.php?post=1205&action=edit

    Then the ID would be 1205. If all (or most of) the Edit All links for this out-of-control set of events do indeed reference the same ID, we can probably craft a query to kill them all, along these lines:

    DELETE 
    FROM   wp_posts
    WHERE  ID = 12345
    OR     post_parent = 12345;

    Where, of course, 12345 would be the actual ID in your case (you might use a tool like phpMyAdmin to run this query, if your host provides it).

    Does that help at all? Of course, it is always sensible to make a complete backup before directly modifying database entries in this way.

    Let me know how you get on or if you need further guidance.

    #1242661
    Susan
    Participant

    They do not have the same ID. They have no title , start date , or end date , but they have unique IDs. I can’t tell what the ID range is because , when I view them in the admin , the ID numbers jump around. There will be maybe 6 or 8 in sequence , and then the next one will jump.

    Is there a query to target blank title fields ?

    #1243252
    Barry
    Member

    Yes, that should be possible with something like the following snippet (once again, take the necessary precautions before running this! That is, back up and know how to restore the backup):

    DELETE
    FROM   wp_posts
    WHERE  LENGTH( TRIM( post_title ) ) = 0
    AND    post_type = 'tribe_events'
    #1254548
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Out of Control Recurring Events Won't Delete’ is closed to new replies.