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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Deleting a Contact with Activity ?
Pages: [1]

Author Topic: Deleting a Contact with Activity ?  (Read 1683 times)

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Deleting a Contact with Activity ?
November 21, 2007, 06:03:40 pm
When I try to delete an account with CiviMail activity I get an error.  Looks like might be because of the activity records from CiviMail.  Is this related and is there a way to delete activity records other than one by one from the activity screen?
- - - -
These posts might be related (but I'm on CiviCRM 1.9.11960):
http://forum.civicrm.org/index.php/topic,426.0.html
http://forum.civicrm.org/index.php/topic,1043.0.html
- - - -
Maybe a feature rather than a bug or maybe other steps necessary if have activity?
- - - -
When I'm logged in the administrator account, I get:

    Deleted Contact(s): 0

        * Total Selected Contact(s): 1

        * The contact record which is linked to the currently logged in user account - "davebean@ecentral.com" - can not be deleted.
- - - -
When I'm not the admin user, but have authority I get more information:
Find Contacts

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    Database Error Code: Cannot delete or update a parent row: a foreign key constraint fails, 1217

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => DELETE FROM civicrm_contact  WHERE (  civicrm_contact.id = 102 )  [nativecode=1217 ** Cannot delete or update a parent row: a foreign key constraint fails]
    [type] => DB_Error
    [user_info] => DELETE FROM civicrm_contact  WHERE (  civicrm_contact.id = 102 )  [nativecode=1217 ** Cannot delete or update a parent row: a foreign key constraint fails]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM civicrm_contact  WHERE (  civicrm_contact.id = 102 )  [nativecode=1217 ** Cannot delete or update a parent row: a foreign key constraint fails]"]


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Deleting a Contact with Activity ?

This forum was archived on 2017-11-26.