• I created a page to show all events with a status of -1 as follows:

    [events_list status=”-1″ scope=”all” limit=”200″] #D, #d #M #Y at #_EVENTTIMES – #_EVENTLINK </br> [/events_list]

    It displays a list of over 40 old events in the past, yet they do not show up under PUBLISHED events or TRASH events, nor can I see them when filtering PAST EVENTS.

    They obviously still linger in the database. How can I delete these old, stale or broken events in the database?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Roger Correia

    (@correiar)

    Is it possible to develop a shortcode to achieve this, such as:

    [events_delete scope=”all” status=”-1″ [/events_delete] or

    [events_delete post_id=”1008, 1009, 1234″ [/events_delete]

    Plugin Support angelo_nwl

    (@angelo_nwl)

    at the moment it’s possible only through custom coding which Im afraid that we are quite limited as per the support forum – https://eventsmanagerpro.com/support-policy/

    Thread Starter Roger Correia

    (@correiar)

    Thanks Angelo…

    I have Events Manager Pro, so I will post my query there. Hopefully you can shed some light on how to clean up these bogus events.

    I have another thread going about locations for unpublished events showing up in the front end; with more investigation, I can see that I, too, have a problem of old/broken events that do not show up in the WordPress admin lingering in my database (status -1). I don’t know if I understand how these un-deletable events might be pulling in bad location data on the front end, but the problem seems to multiply into other areas of EM. This problem persists even with all plugins turned off and the default theme selected.

    Thread Starter Roger Correia

    (@correiar)

    I did some further investigation following the post from @chadamski and I also found that in addition to un-deletable events, I have numerous duplicate/ un-deletable locations as well.

    In the Events Manager admin area I can see only 20 valid locations. However, when I run the following shortcode, I get over 45 locations, many duplicates:

    [locations_list scope=”all” limit=”100″]#_LOCATIONLINK </br> [/locations_list]

    When I click on their link, it just takes me to the home page.

    Any update? I’ve got a buggy client site that I suspect is related to this issue.

    Thread Starter Roger Correia

    (@correiar)

    I don’t have any errors or erratic behaviour going on and my error.log file is clean.

    However, I did find a bunch of un-deletable events and locations and in discussion with Tech Support, the only way to actually delete them is to use phpMyAdmin and run SQL to get rid of those broken / orphaned records.

    This is a bit risky since you are going in through the “back door”.

    I used the following 2 SQL commands to do that:

    DELETE FROM wp_em_locations WHERE location_status = “-1” to get rid of location records.

    DELETE FROM wp_em_events WHERE post_id NOT IN (SELECT ID FROM wp_posts WHERE post_type=”event”) to get rid of event records.

    You should always back up first when doing this to ensure you have a safe return point in case of failure..

    Thread Starter Roger Correia

    (@correiar)

    Before issuing the DELETE command, you may wish to check if these are indeed problem records for your site.

    In the 2 SQL statements above, replace ‘DELETE’, with ‘SELECT *’ and run the query and check the results to see if those records are in fact broken / orphaned.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to delete events’ is closed to new replies.