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) »
  • Database error on deleted member
Pages: [1]

Author Topic: Database error on deleted member  (Read 1079 times)

anders

  • Guest
Database error on deleted member
December 02, 2009, 12:23:23 pm
I get this error when I try to register a new member who has previously been a member but deleted:

Sorry. A non-recoverable error has occurred.
DB Error: already exists

Database Error Code: Duplicate entry 'mail@example.com-1' for key 2, 1062

Error Details:

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

       
Code: [Select]
=> -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  75 , 'mail@example.com' ,  12 )  [nativecode=1062 ** Duplicate entry 'mail@example.com-1' for key 2]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  75 , 'mail@example.com' ,  12 )  [nativecode=1062 ** Duplicate entry 'mail@example.com-1' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  75 , 'mail@example.com' ,  12 )  [nativecode=1062 ** Duplicate entry 'mail@example.com-1' for key 2]"]
)

Original mail changed with mail@example.com.

Is this possible to prevent?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Database error on deleted member
December 03, 2009, 09:29:00 am
The "deleted contact's" record in the civicrm_uf_match table SHOULD have been deleted when you deleted that contact record (I assume that's what you mean by deleted member).  If this problem occurs repeatedly, then I suspect that your schema definition(s) may be a bit off. You might want to run the DBTools diagnostics to see if discrepancies are reported:

http://wiki.civicrm.org/confluence/display/CRMDOC/Database+Troubleshooting+Tools
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Database error on deleted member

This forum was archived on 2017-11-26.