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) »
  • DB Error: already exists, dupe user created, unable to sync users to contacts
Pages: [1]

Author Topic: DB Error: already exists, dupe user created, unable to sync users to contacts  (Read 2700 times)

effusing

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.1
  • PHP version: 5.3.8
DB Error: already exists, dupe user created, unable to sync users to contacts
September 06, 2013, 12:01:35 pm
We are running 4.3.5 with Joomla 2.5.14. When a user logs in a duplicate user is created.

If they browse any civi page they get this error,  trying to sync users to civi contacts gives the same error.

Quote
Sorry but we are not able to provide this at the moment.
--------------------------------------------------------------------------------
DB Error: already exists

I turned debug on and browsed while logged in to a civi page and got this, anybody got an idea? thanks.


Sorry but we are not able to provide this at the moment.

--------------------------------------------------------------------------------

DB Error: already exists


Error Details
 

Database Error Code: Duplicate entry 'email@yahoo.com-1' for key 'UI_uf_name_domain_id', 1062

Additional Details:
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -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 ,  757 , 'email@yahoo.com' ,  1014 )  [nativecode=1062 ** Duplicate entry 'email@yahoo.com-1' for key 'UI_uf_name_domain_id']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  757 , 'email@yahoo.com' ,  1014 )  [nativecode=1062 ** Duplicate entry 'email@yahoo.com-1' for key 'UI_uf_name_domain_id']
    [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 ,  757 , 'email@yahoo.com' ,  1014 )  [nativecode=1062 ** Duplicate entry 'email@yahoo.com-1' for key 'UI_uf_name_domain_id']"]
)



 
Return to home page.
 
« Last Edit: September 06, 2013, 12:03:25 pm by effusing »

effusing

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.1
  • PHP version: 5.3.8
Re: DB Error: already exists, dupe user created, unable to sync users to contacts
September 06, 2013, 02:45:30 pm
Another piece of info. I tried merging all the duplicate contacts and civicrm reported it completed. However, when I examine the civicrm_contact table in Joomla, the duplicate contacts remain in the table, for at least the user in question that generated the error in my first post.

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: DB Error: already exists, dupe user created, unable to sync users to contacts
September 06, 2013, 07:47:08 pm

can u truncate the civicrm_uf_match table and see if that helps things

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

effusing

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.1
  • PHP version: 5.3.8
Re: DB Error: already exists, dupe user created, unable to sync users to contacts
September 06, 2013, 08:04:18 pm
Hi Lobo, thanks I will back up the dB and try it.

I have been going through settings to see if I could find anything questionable.

I found the Joomla Users Table Name setting is apparently wrong. It is set to jos_users

However in my dB the table prefix is different, it is not jos_

Might that make a difference?

effusing

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.1
  • PHP version: 5.3.8
Re: DB Error: already exists, dupe user created, unable to sync users to contacts
September 07, 2013, 09:29:20 pm
Lobo, that appears to resolve the dB errors. thanks for your help.

still wondering.... I found the Joomla Users Table Name setting is apparently wrong. It is set to jos_users

However in my dB the table prefix is different, it is not jos_

should I correct this?

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: DB Error: already exists, dupe user created, unable to sync users to contacts
September 08, 2013, 10:24:00 pm

I dont think that setting is used any more (we've been switching to using the client CMS api's and avoiding going to tables directly)

would be good for someone to check and confirm this and if so submit  patch to remove the setting

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • DB Error: already exists, dupe user created, unable to sync users to contacts

This forum was archived on 2017-11-26.