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 CiviMember (Moderator: Deepak Srivastava) »
  • Can't delete individual
Pages: [1]

Author Topic: Can't delete individual  (Read 2243 times)

kdruckman

  • Guest
Can't delete individual
June 09, 2007, 12:26:01 am
Using Drupal 5.1 and the lastest version of civiCRM

I tried to delete 4 of the sample data members, and got a 500 error.  I refreshed and 3 were gone, but the one that was left won;t go away...

I get this message:

Sorry. A non-recoverable error has occurred.

Database Error Code: Cannot delete or update a parent row: a foreign key constraint fails (`db207651746/civicrm_membership`, CONSTRAINT `FK_civicrm_membership_owner_membership_id` FOREIGN KEY (`owner_membership_id`) REFE, 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_membership  WHERE (  civicrm_membership.id = 23 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`db207651746/civicrm_membership`, CONSTRAINT `FK_civicrm_membership_owner_membership_id` FOREIGN KEY (`owner_membership_id`) REFE]
    [type] => db_error
    [user_info] => DELETE FROM civicrm_membership  WHERE (  civicrm_membership.id = 23 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`db207651746/civicrm_membership`, CONSTRAINT `FK_civicrm_membership_owner_membership_id` FOREIGN KEY (`owner_membership_id`) REFE]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM civicrm_membership  WHERE (  civicrm_membership.id = 23 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`db207651746/civicrm_membership`, CONSTRAINT `FK_civicrm_membership_owner_membership_id` FOREIGN KEY (`owner_membership_id`) REFE]"]
)


Any ideas?

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: Can't delete individual
June 09, 2007, 01:05:29 am

Yes, please enable the CiviMember component in your Global Settings >> Administrator. I suspect we'll fix this in 1.8 since this has resulted in multiple support messages :)

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

kdruckman

  • Guest
Re: Can't delete individual
June 09, 2007, 01:16:08 am
I tried that already.. it is enabled.

kdruckman

  • Guest
Re: Can't delete individual
June 09, 2007, 01:25:15 am
I manually edited the db... i hope I didn't screw anything up...

I managed to delete the entry with id=23 but first had to remove a reference to that id in the owner_membership_id field.

Since I don't yet have much grasp of the overall structure, I hope this doesn't come back to haunt me later!   :-\

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Can't delete individual

This forum was archived on 2017-11-26.