Multiple instances of the same event

Home Forums Calendar Products Events Calendar PRO Multiple instances of the same event

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #957467
    Nicholas
    Participant

    I’d like to reopen this thread: https://theeventscalendar.com/support/forums/topic%2Fmultiple-instances-of-the-same-event-hundreds/?source=tri.be#post-876707

    I’ve been working with my client for few months now, trying to determine how to process to fix our issue.

    As a reminder, I have a client site that sometime last year somehow generated over 200,000 occurrences of the same event and cannot be deleted. I’ve tried every method mentioned in the thread, and finally without any previous luck, decided to attempt the Event Rocket and delete everything in events and start over.

    However, after several tries, this plugin has failed to delete any posts. It simply hangs up and on the “Still working…” screen.
    In the console log, I’m getting a Failed to load resource log:

    “/wp-content/plugins/event-rocket//inc/assets/cleanup.js?ver=4.1.1 Failed to load resource: the server responded with a status of 404 (Not Found)”

    I realize Event Rocket isn’t your plugin, but I’m hoping I can get some more assistance on how to remove the event occurrences. I will try anything at this point to wipe the whole events plugin and plugin database clean.

    Thanks!

    Nicholas

    #957697
    Barry
    Member

    Unfortunately there is a bug in the current Event Rocket release with regards to event clean up (and the next release of Event Rocket is not likely to be delivered until the next major release of The Events Calendar goes out).

    That said, in the interim (though modifying plugin code isn’t ideal) you could open up and modify misc/clean-up.php from that plugin and change:

    wp_enqueue_script( 'eventrocket_cleanup', EVENTROCKET_URL . '/inc/assets/cleanup.js', 'jquery', false, true );

    To:

    wp_enqueue_script( 'eventrocket_cleanup', EVENTROCKET_URL . 'assets/cleanup.js', 'jquery', false, true );

    You’re also correct that we don’t officially support Event Rocket here, so if you need further assistance on this one please do post on the Event Rocket forum (there may even be an existing topic about this).

    The alternative is running a set of database queries to perform the cleanup work, which we can also explore: I would first caution you to make a complete backup of your site (and make yourself aware of how to restore that backup) – then, once you’re ready, just let me know and we can look at the actual queries.

    Thanks!

    #958808
    Nicholas
    Participant

    I attempted this method, but had no luck.
    I would be open to exploring another solution. Honestly, anything that would clear out all events calendar entries and allow me to start from scratch would be great! Please advise.
    Thanks!

    #958880
    Barry
    Member

    Hi Nicholas,

    So these are some example queries you can run – as ever, take the time to backup first of all (and ensure you know how to restore the backup!).

    Please also note that I’m assuming your database tables are prefixed wp_ – of course they may be something else in which case you’ll need to adjust appropriately 🙂

    Removing all event posts

    DELETE FROM wp_posts WHERE post_type = 'tribe_events';

    Cleaning up any orphaned post meta data

    DELETE FROM wp_postmeta 
    WHERE  post_id NOT IN (
        SELECT 
            ID
        FROM
            wp_posts
    );

    Running both the above should clean out all event data (but leave options, settings, organizers and venues in place).

    #958964
    Nicholas
    Participant

    I’m sorry if this is a stupid question, but how do I run these queries? Where do I put these? Thanks!

    #959175
    Barry
    Member

    Hi Nicholas,

    That’s not a stupid question at all.

    There are actually a few ways you can do this – but one of the most popular and most widely available systems is phpMyAdmin. If your site happens to be hosted using a package that offers CPanel (or some similar web interface) you may even find this app is already installed.

    Might that work in your case?

    #959361
    Nicholas
    Participant

    Thank you!

    It worked! Over 200K posts deleted!!!
    Woooo!

    #959404
    Barry
    Member

    Awesome, glad that helped 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Multiple instances of the same event’ is closed to new replies.