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) »
  • Event copies being created
Pages: [1]

Author Topic: Event copies being created  (Read 2600 times)

felixmartel

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6.31
  • MySQL version: 5.1.54
  • PHP version: 5.3.5
Event copies being created
January 26, 2012, 08:44:31 pm
For some reason, copies of some of my events are cropping up on the site. I'm hoping it's one of my admins creating them by mistake. Is there a logging facility of some sort which can tell me which user creates what in CiviCRM ?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Event copies being created
January 26, 2012, 10:08:11 pm
Created by is not exposed in the UI, but you can check "created_id" column in your "civicrm_event" database table. It stores the contact id, who created the event.

HTh
Kurund
Found this reply helpful? Support CiviCRM

Pelle P

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • CiviCRM version: CiviCRM 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.39
  • PHP version: 5.2.10
Re: Event copies being created
October 04, 2012, 06:01:17 am
Hi felixmartel

Did you find the explanation for the copies?

I experience exactly the same problem on a site...

Best Regards

Pelle
« Last Edit: October 04, 2012, 06:22:04 am by Pelle P »

jcm55

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 14
Re: Event copies being created
October 04, 2012, 07:38:11 am
Check your Drupal permissions.  I bet you have "Administer CiviCRM" or "edit all events" turned on for Anonymous User.  If that's the case, then web crawlers (Google, Yahoo, Bing, etc) will create event copies as they crawl your site and follow the "Copy" link on the Manage Events page.

Pelle P

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • CiviCRM version: CiviCRM 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.39
  • PHP version: 5.2.10
Re: Event copies being created
October 04, 2012, 08:49:30 am
Hi jcm55

Sounds as a god explanation.

But I am running Joomla. And I cant find an "edit all events" in my Joomla Access Control.

I have now reset my Joomla Access Control, so it matches the Demo setup - http://sandbox.joomla.civicrm.org

Hope this helps


« Last Edit: October 04, 2012, 02:28:21 pm by Pelle P »

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Event copies being created
October 04, 2012, 07:45:37 pm
can you confirm if/that this is the case? if so we might want to change the link to a button. u could file an issue for that. (though i guesshaving anonymous users able to copy events is most likely something you want to not allow in most instances)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

ylavoie

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
    • Regroupement de l'industrie électronique du Québec
  • CiviCRM version: 4.2.4
  • CMS version: Joomla 2.5.7
  • MySQL version: 5.5.24
  • PHP version: 5.3.10
Re: Event copies being created
October 16, 2012, 12:29:40 am
Hi,

I am using Joomla also and Civicrm 4.2.2.
I am still experiencing this and my privileges are OK, web crawlers should not be the cause.
1- Any other suggestion?
2- I have a few hundred spurious event copies of copies of copies... Is there a way to mass delete those?
3- How can I disable the delete confirmation? After a few tens, it got on my nerves and I still have 300 hundreds more to go. ;-)

Yves

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Event copies being created
October 17, 2012, 01:57:08 am
Quote
I am still experiencing this and my privileges are OK, web crawlers should not be the cause.
why do you say that?
Quote
2- I have a few hundred spurious event copies of copies of copies... Is there a way to mass delete those?
you could try writing a small API script to do this. Or in fact you could just call URLs in the following format
Quote
http://drupal.demo.civicrm.org/civicrm/ajax/rest?json=1&sequential=1&debug=1&&entity=Event&action=delete&id=1000
Replacing 1000 with the ID of the event you want to delete
Try using the API explorer to work out how to do that: http://drupal.demo.civicrm.org/civicrm/api/explorer
I suspect it will look different, but not so different, on Joomla.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

stuajc

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Event copies being created
April 15, 2013, 10:20:12 am
I'm experiencing the same issue.

My "created_id" column for the copied events shows user 1 as the creator.

My Drupal permissions are good: "Administer CiviCRM" and "Edit all events" are both disabled for anonymous users.

I noticed that while anonymous users can't actually edit events, they can visit my manage events page at mysite.com/civicrm/event/manage?reset=1. So probably the crawlers are making the copies.


stuajc

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Event copies being created
April 15, 2013, 10:31:32 am
Ah. Under Drupal permissions, "Access CiviEvent" was enabled for anonymous users. The manage events page is no longer accessible by anonymous users. I'm guessing the duplicate events will stop being generated now.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Event copies being created
April 23, 2013, 11:08:39 am
Access CiviEvent was the inappropriate permission for anonymous users in my case as well.  We turned it off and the event duplication stopped.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Event copies being created
November 24, 2013, 04:21:16 pm
Confirmed that we've observed this on an imported site with incorrect permissions also. A few thoughts from having debugged it -

1. GET URLs shouldn't modify data; Michael McAndrew is right that a link is not correct for a request which modifies data. (This is probably a bigger issue in CiviCRM than just this URL, since it's a pattern throughout the interface.) (More reading on why this is bad)

2. If "Access CiviCRM" was the only permission at stake, then the other actions in that menu would presumably take effect as well? So the presence of this behaviour seems to suggest that permissions aren't being applied consistently, quite possibly because of 1 above (ie, requiring a POST request to modify data would ensure access permissions for civi admin are applied consistently). That or we have very well behaved web crawlers ;)

3. The "copy event" functionality would make more sense if the defaults were sensible - eg the created_date value should be the time the event was copied, not the original event's created_date.

4. Looking at the order of events and copies, I wondered if some data from the copied event was being incorrectly stored back to the original event as well. I don't know the site intimately, but the order of event dates, created dates, and IDs seemed inconsistent. (EDIT: Can't repro that on demo, found CRM-13820 instead.)

5. I can see how people would easily confuse the "access civievent" permission and think attendees might need it for registering. A more descriptive permission name might help with that (eg "administer civievent" or "manage events").
« Last Edit: November 24, 2013, 05:13:52 pm by Chris Burgess »
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event copies being created

This forum was archived on 2017-11-26.