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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Status Override Error: Cannot delete or update a parent row: a foreign key...
Pages: [1]

Author Topic: Status Override Error: Cannot delete or update a parent row: a foreign key...  (Read 1586 times)

wbhst83

  • Guest
Status Override Error: Cannot delete or update a parent row: a foreign key...
January 06, 2010, 06:45:08 pm
So been dealing with many different errors in migrating a install from one server to another.  Everything is working at this point but some minor issues.  One of those issues is when a admin attempts to force a Status Override (I.E. changing expired to current) then saving they get the following foreign key error.  Any thoughts?  Thanks!

Code: [Select]
unrecoverable error
Sorry. A non-recoverable error has occurred.

DB Error: constraint violation

Database Error Code: Cannot delete or update a parent row: a foreign key constraint fails (`*DBNAME*/civicrm_membership_log`,
CONSTRAINT `civicrm_membership_log_ibfk_2` FOREIGN KEY (`status_id`) REFERENCES `civicrm_membership` (`status_id`) ON DELETE CASCADE), 1451

Return to home page.

Error Details:

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

[code => -3
[message] => DB Error: constraint violation [mode] => 16 [debug_info] => UPDATE civicrm_membership SET contact_id = 19463 , membership_type_id = 14 , join_date = 20040212 , start_date = 20040212 , end_date = 20110131 , source = NULL , status_id = 2 , is_override = NULL , reminder_date = NULL WHERE ( civicrm_membership.id = 20674 )
[nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`*DBNAME*/civicrm_membership_log`,
CONSTRAINT `civicrm_membership_log_ibfk_2` FOREIGN KEY (`status_id`) REFERENCES `civicrm_membership` (`status_id`) ON DELETE CASCADE)] [type] => DB_Error [user_info] => UPDATE civicrm_membership SET contact_id = 19463 , membership_type_id = 14 , join_date = 20040212 , start_date = 20040212 , end_date = 20110131 , source = NULL , status_id = 2 , is_override = NULL , reminder_date = NULL WHERE ( civicrm_membership.id = 20674 )
[nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`*DBNAME*/civicrm_membership_log`,
CONSTRAINT `civicrm_membership_log_ibfk_2` FOREIGN KEY (`status_id`) REFERENCES `civicrm_membership` (`status_id`) ON DELETE CASCADE)] [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_membership SET contact_id = 19463 , membership_type_id = 14 , join_date = 20040212 , start_date = 20040212 , end_date = 20110131 , source = NULL , status_id = 2 , is_override = NULL , reminder_date = NULL WHERE ( civicrm_membership.id = 20674 ) [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`*DBNAME*/civicrm_membership_log`, CONSTRAINT `civicrm_membership_log_ibfk_2` FOREIGN KEY (`status_id`) REFERENCES `civicrm_membership` (`status_id`) ON DELETE CASCADE)]"]
)

« Last Edit: January 06, 2010, 07:49:34 pm by wbhst83 »

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Status Override Error: Cannot delete or update a parent row: a foreign key...
January 25, 2010, 06:50:35 pm
Not that this helps, but I'm getting the same error on an otherwise fresh testing install (3.1.beta6) when I try to setup custom data fields.

I had been trying to migrate this testing install from one server to another, and was having issues, so decided to try setting some of the fields up manually (exporting/importing the data is otherwise simple, since, as I said, it's testing at the moment), when I came across this.  :shrug:

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Status Override Error: Cannot delete or update a parent row: a foreign key...

This forum was archived on 2017-11-26.