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 (Moderator: Dave Greenberg) »
  • Orphaned ACLS
Pages: [1]

Author Topic: Orphaned ACLS  (Read 1743 times)

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Orphaned ACLS
May 07, 2008, 11:15:23 am
I have a bunch of ACL Role assignments where the Role now longer exists, but it still shows up on the assignment page, and probably adversely affecting my performance.

I tried running

DELETE FROM `civicrm_acl_entity_role` where `acl_role_id` NOT IN (SELECT id FROM civicrm_acl);

But the entries still show on the assignment page.

Any ideas?
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

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: Orphaned ACLS
May 07, 2008, 11:50:38 am

1. that statement does not seem right, since acl_role_id is in the civicrm_option_value table

2. how do u get orphaned acl's? I suspect when you delete an acl role we dont delete all acl_entity_role records? is this right? if so, can you please file an issue and we'll fix in 2.1

thanx

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

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Orphaned ACLS
May 07, 2008, 03:24:05 pm
1. Ah, that explains it. I wondered why there was no _acl_role table.

2. Most orphans were ACLs created by og_sync module. The only others were a few of the every first ACLs I created back in CiviCRM 1.7, and I likely manipulated the database manually for those.

In any case, I'd rather err on the side of leaving an unused record in the database than being over aggressive with FK constraints and cascading deletes, so I'm not worried about it. Now that I know roles are stored as option_values, I'm all set.
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Orphaned ACLS

This forum was archived on 2017-11-26.