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) »
  • Foreign Key Failure while deleting e-mail address
Pages: [1]

Author Topic: Foreign Key Failure while deleting e-mail address  (Read 1576 times)

prickeke

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 4
Foreign Key Failure while deleting e-mail address
August 21, 2007, 01:39:28 pm
I was attempting to delete an e-mail address today from an individual and got the following error:

     Sorry. A non-recoverable error has occurred.

    Database Error Code: Cannot delete or update a parent row: a foreign key constraint fails (`45_tears_civicrm_1/civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_email_id` FOREIGN KEY (`email_id`) REFERENCES `civicrm_email` (`id`)), 1451

    Return to CiviCRM menu.

Error Details:

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

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => DELETE FROM civicrm_email  WHERE (  civicrm_email.id = 1027 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`45_tears_civicrm_1/civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_email_id` FOREIGN KEY (`email_id`) REFERENCES `civicrm_email` (`id`))]
    [type] => DB_Error
    [user_info] => DELETE FROM civicrm_email  WHERE (  civicrm_email.id = 1027 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`45_tears_civicrm_1/civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_email_id` FOREIGN KEY (`email_id`) REFERENCES `civicrm_email` (`id`))]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM civicrm_email  WHERE (  civicrm_email.id = 1027 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`45_tears_civicrm_1/civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_email_id` FOREIGN KEY (`email_id`) REFERENCES `civicrm_email` (`id`))]"]
)

prickeke

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 4
Re: Foreign Key Failure while deleting e-mail address
August 21, 2007, 01:39:59 pm
Using CiviCrm 1.7 latest.

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: Foreign Key Failure while deleting e-mail address
August 21, 2007, 02:09:31 pm

This is most likely an issue with CiviCRM. Can you please file an issue and we'll fix it in trunk and/or 1.8 depending on the complexity of the fix

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

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Foreign Key Failure while deleting e-mail address
February 29, 2008, 06:27:30 pm
Sorry to re-open an old topic, but I could not find this issue in the issue tracker.  Did this get resolved?  If so, in which version?  I have it in 1.9.12432.

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: Foreign Key Failure while deleting e-mail address
March 02, 2008, 01:05:13 am

not sure when it got resolved, but i'm pretty sure this is resolved in 2.0 since we use mysql to go ahead and do the cascaded deletions :)

verifying this would be a good thing to do :)

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

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Foreign Key Failure while deleting e-mail address
March 02, 2008, 10:51:37 am
It seems to be resolved in the online demo of 2.0.  Thanks.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Foreign Key Failure while deleting e-mail address

This forum was archived on 2017-11-26.