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) »
  • error creating new user as admin or synchronizing users (civicrm 2.0)
Pages: [1]

Author Topic: error creating new user as admin or synchronizing users (civicrm 2.0)  (Read 1467 times)

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
error creating new user as admin or synchronizing users (civicrm 2.0)
March 22, 2008, 03:58:16 pm
Hi,

For some reason it keeps trying to insert contact_id '3' when I already have 8 contacts in the system. the highest contact_id is '8' in both civicrm_contact and civicrm_uf_match so I'm not sure if there is another table the function looks at to determine the contact_id

For some reason, when users create accounts themselves it works just fine. This only happens when an admin creates a user account (or tries to synchronize users to contacts)

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 (uf_id , contact_id , domain_id ) VALUES ( 10 ,  3 ,  1 )  [nativecode=1062 ** Duplicate entry '3' for key 4]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (uf_id , contact_id , domain_id ) VALUES ( 10 ,  3 ,  1 )  [nativecode=1062 ** Duplicate entry '3' for key 4]
    [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 (uf_id , contact_id , domain_id ) VALUES ( 10 ,  3 ,  1 )  [nativecode=1062 ** Duplicate entry '3' for key 4]"]
)

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: error creating new user as admin or synchronizing users (civicrm 2.0)
March 23, 2008, 11:12:14 am

can you truncate your session table and try again. just want to make sure there's no old values in the session table

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

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: error creating new user as admin or synchronizing users (civicrm 2.0)
March 23, 2008, 04:23:31 pm
truncated the table

same issue

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: error creating new user as admin or synchronizing users (civicrm 2.0)
March 23, 2008, 11:25:53 pm
VJ,

Try truncating "civicrm_uf_match" table.,then re-sync.

kurund
Found this reply helpful? Support CiviCRM

vijai

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: error creating new user as admin or synchronizing users (civicrm 2.0)
March 24, 2008, 03:55:59 am
ok, that initially worked (I was able to synchronize)

However, the next time I tried to add an user via administration interface..I got the same error

It does still work if a user creates a new account using drupal's 'create a new account' feature (both drupal user and civicrm contact is created). The website also has facebook authentication. If a user opts to login using their facebook account, a drupal user and civicrm contact is created. Only problem seems to be while adding user using 'add user'


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: error creating new user as admin or synchronizing users (civicrm 2.0)
March 24, 2008, 02:11:28 pm

1. i assume this is drupal 5.x

2. can you add some trace code and figure out why its trying to reuse contact_id '3' in the add user case. by any chance is your admin user, contact_id 3?

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) »
  • error creating new user as admin or synchronizing users (civicrm 2.0)

This forum was archived on 2017-11-26.