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) »
  • Cannot delete or update a parent row: a foreign key constraint fails, 1217
Pages: [1]

Author Topic: Cannot delete or update a parent row: a foreign key constraint fails, 1217  (Read 7307 times)

buddharide

  • Guest
Cannot delete or update a parent row: a foreign key constraint fails, 1217
August 29, 2007, 12:28:23 pm
I'm getting this when I try to delete a user. I'm using Drupal 5.2 and CivicRM 1.8 beta:

  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
         (
             [0] => 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 = 105 )  [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 = 105 )  [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 = 105 )  [nativecode=1217 ** Cannot delete or 
update a parent row: a foreign key constraint fails]"]
)


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: Cannot delete or update a parent row: a foreign key constraint fails, 1217
August 29, 2007, 12:45:45 pm
First i would recommend you to upgrade to CiviCRM v1.8 stable. (there have been no db changes from beta to stable).
Can you give more details(steps) how you get this error ?

Also can you try to replicate it on http://demo.civicrm.org/drupal and file an issue in jira if replicated.

kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Cannot delete or update a parent row: a foreign key constraint fails, 1217

This forum was archived on 2017-11-26.