4

I have a few test events I registered a single user for. I then removed the single user from all the events but when I go to delete the event I get a message the event still has participants. There are no participants when I do a search. It appears to be some sort of bug. How do I force delete the event? Is there a way to get rid of it via MySQL if the GUI won't comply?

CiviCRM 4.6.9 Drupal 7.41

Thanks

  • Try searching for "test participant" via "Find Participant" – CiviTeacher Nov 9 '15 at 0:02
3

Use the API explorer :

$result = civicrm_api3('Event', 'delete', array(
  'sequential' => 1,
  'id' => <your_event_id>,
));

This will delete the event along with the related participant.

  • Oh yes, cooking with gas. It works. Thanks. – carclubadmin Nov 10 '15 at 0:06
2
  1. backup your database.

  2. DELETE from civicrm_event WHERE id=1

You can change 1 to another number, or use a different operator such as id>1

  • Is it Ok to do this if the event still has participants? can you do it for multiple events in the one line? – Robinnz Feb 21 '18 at 8:32
2

If you have used the "Test-Drive" mode of the form, there may be test registrations for the event. Those may prevent deleting the event but would don't show up in search unless you untick "yes" on "Participant is a Test?".

Maybe you can delet the event after you removed the test registrations - obviously force deleting should be the last resort :)

  • I did remove all registrations test and otherwise but unfortunately no luck. Darn. It's really weird. – carclubadmin Nov 10 '15 at 0:00
  • Hmmm then I am out of ideas except for cleanung all caches, restarting the server etc. - but that's a long shot and you probably already tried it. – Fabian Nov 10 '15 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.