CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Mass deletion of events
Pages: [1]

Author Topic: Mass deletion of events  (Read 511 times)

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Mass deletion of events
February 19, 2014, 02:18:24 am
I've been doing some work on a client's site, and have just become aware that nearly 2500 bogus events have been created within CiviCRM.  I'm not certain how these events (which as far as I can see are all copies of one or two existing genuine events) came to be created, but based on evidence from the log files I'm assuming that they have been created by an unauthorised user. It looks like the permissions may have been wrongly set, thus allowing the required access.

I've reviewed and tightened up the permissions, and I'm now looking to clean up. Ideally I'd like to just delete the relevant rows from the database table, as manually deleting this many events through the UI would take forever. There's nothing obvious to suggest that deleting rows would cause problems, but I'm aware that the Civi db structure can be fiddly to tinker with, with lots of foreign keys, etc.

Any insight as to whether it is OK to just remove rows from civicrm_events?
Graham Mitchell
http://mc3.coop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mass deletion of events
February 19, 2014, 06:34:46 am

Might want to use the api to loop thru and delete all created events. This will ensure that the various objects linked to an event are also deleted

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Re: Mass deletion of events
June 11, 2014, 03:03:46 pm
Hey

I have this issue too - not sure how it started but they copy each other constantly. How did you go about the removal?

Any advice mucho appreciato :)
www.ulearnschool.com

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Mass deletion of events
June 12, 2014, 07:41:47 am
I encountered a similar problem a few months back with events seemingly randomly replicating themselves over and over again.  I discovered that the cause was that the site had the permissions set incorrectly for the public user group.  If you set CiviEvent: access CiviEvent to Allowed for the public user group then when the search engine spiders hit your site it will cause duplication of all events on the site. So you end up with an exponential increase in the number of events each time your site gets crawled.  Setting that permission to denied (in my case inherited also worked) solved the problem.

And then clean up is a pain in the but, the API is probably your best bet like lobo suggested.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Mass deletion of events

This forum was archived on 2017-11-26.