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) »
  • Fatal Error on User/Contact Synch (Joomla)
Pages: [1]

Author Topic: Fatal Error on User/Contact Synch (Joomla)  (Read 4640 times)

jgilhousen

  • Guest
Fatal Error on User/Contact Synch (Joomla)
August 14, 2007, 03:49:25 pm
After humming along without problems for a few days on a new CiviCRM (1.8.beta.10790) installation on a Joomla (1.0.13 Stable) site, suddenly synch users stopped working, returning "Sorry. A non-recoverable error has occurred," and the following 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 (uf_id , contact_id , domain_id , email ) VALUES ( 66 ,  26 ,  1 , '[i]user@email.address[/i]' )  [nativecode=1062 ** Duplicate entry '26' for key 3]
    [type] => db_error
    [user_info] => INSERT INTO civicrm_uf_match (uf_id , contact_id , domain_id , email ) VALUES ( 66 ,  26 ,  1 , '[i]user@email.address[/i]' )  [nativecode=1062 ** Duplicate entry '26' for key 3]
    [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 , email ) VALUES ( 66 ,  26 ,  1 , '[i]user@email.address[/i]' )  [nativecode=1062 ** Duplicate entry '26' for key 3]"]
)

I've obviously masked and italicized the identifying email address to protect my user's privacy, but otherwise it's a cut and paste of the returned error message.

I thought the point of synching was so that if a contact entered manually subsequently logged on and registered, that the duplication would be recognized and merged.  What am I missing?  I expect this to arise often, and want to nip it while it's still a bud.

J-M +[/code]

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: Fatal Error on User/Contact Synch (Joomla)
August 14, 2007, 04:00:56 pm

By any chance is it a duplicate email address? i.e. do two users have the same email address? The error indicates that contact id 26 is already present in the match table and is most likely associated with another joomla user

You might want to figure out how/why the same email address is shared across two joomla users. We assume unique emails for the match 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

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 14, 2007, 04:40:59 pm
The userbase is still small enough that I can check each individual record in both J! user management, and CiviCRM contacts.  I had done that already before posting, and found only one instance of that email address in each.

I'll double check.

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 14, 2007, 05:18:20 pm
Quote from: Donald Lobo on August 14, 2007, 04:00:56 pm

By any chance is it a duplicate email address? i.e. do two users have the same email address?
lobo


I'm very confident the answer is no.

I just went through each user record, and I have only one registered user with that email address.

I also checked each contact record, and again, only one contact with that email address.

I don't know how to check the associations, as they don't seem to appear anywhere within CiviCRM.

It is possible that two user accounts were set up for this individual, one through the administrative back-end, and the other through the self-registration process, with the duplicate being deleted with the Joomla user management component.  Perhaps some trace of the deleted duplicate record still exists in the database that is causing this error?

If so, I could probably delete the offending email field directly with phpMyAdmin.  My only fear is causing bigger problems by deleting it from the active rather than the deleted account.  If all of this conjecture is even valid in the first place.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Fatal Error on User/Contact Synch (Joomla)
August 15, 2007, 10:03:41 am
The "duplicate" key error you're getting means:
*  CiviCRM is trying to insert a new record in civicrm_uf_match for CiviCRM contact with civicrm_contact.id = 26
* BUT there is already a record in civicrm_uf_match for this contact ID.

So, the next thing I would do to try and debug this is to find the existing record in civicrm_uf_match (select * from civicrm_uf_match where contact_id = 26) and compare the Email Address in that record to the email address of the record in jos_user (select * from jos_users where id = 66).
Protect your investment in CiviCRM by  becoming a Member!

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 16, 2007, 12:31:34 am
Thanks.  I'm fried at the moment, so will give it a shot tomorrow and report back.  It seems to have "broken" deduping/merge, too, so I need to resolve this before the userbase gets unmanageable.  Thank goodness this is only a county-wide campaign.

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 16, 2007, 12:10:01 pm
I found the corresponding records.  I deleted the entry for the civicrm_uf_match.  Resynch worked, but merges from find duplicates is still broken, returning:

Code: [Select]
Parse error: syntax error, unexpected ',', expecting '(' in /home/supportc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Merge.php on line 239
Here's what I propose to try next:

Delete the contact altogether in CiviCRM; Delete the corresponding user in the Admin panel in Joomla.  Re-enter the contact manually.  Re-enter the user manually.  Resynch.

Complication:

CiviCRM is not finding matches to previously entered contacts when those individuals subsequently create a Joomla user account.  On Resynch, it creates a new record with only the email address populated.  I have been successful in merging the records in the past.  Now that merge attempts result in the error message above, I may be stuck.

J-M +

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: Fatal Error on User/Contact Synch (Joomla)
August 17, 2007, 01:25:39 am
I guess you are using PHP4. We have fixed few PHP4 issues. Can you try this with latest CiviCRM beta 10920.
let us know if it works for you.

thanx,
kurund
Found this reply helpful? Support CiviCRM

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 20, 2007, 05:56:58 pm
Quote from: Kurund Jalmi on August 17, 2007, 01:25:39 am
I guess you are using PHP4. We have fixed few PHP4 issues. Can you try this with latest CiviCRM beta 10920.
let us know if it works for you.

thanx,
kurund

Yes, I'm stuck with PHP4.

Thanks for the advice.  I downloaded the new release, but cannot find any release notes, change logs or upgrade instructions.  I see plenty of info on upgrade from 1.7 to 1.8, but not 1.8-beta to 1.8-stable.

J-M +
« Last Edit: August 20, 2007, 06:00:24 pm by jgilhousen »

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: Fatal Error on User/Contact Synch (Joomla)
August 20, 2007, 07:49:18 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+on+Joomla%21

You do not need to upgrade the db (i.e. skip step 7) for a beta -> stable upgrade in the same version

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

jgilhousen

  • Guest
Re: Fatal Error on User/Contact Synch (Joomla)
August 20, 2007, 09:02:04 pm
Quote from: Donald Lobo on August 20, 2007, 07:49:18 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+on+Joomla%21

You do not need to upgrade the db (i.e. skip step 7) for a beta -> stable upgrade in the same version

lobo


Holy cow!  I was expecting it just being a matter of replacing the files that changed between the version I got just a week ago, and now.  Wasn't expecting to have to build and entire working duplicate of the whole site, and do so much reconfiguration.

I'm going to have to schedule this for later.

Thanks for clarifying.  I'd have never guessed that step 7 was the only one I could skip.

J-M +

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: Fatal Error on User/Contact Synch (Joomla)
August 21, 2007, 12:42:38 am

Yes unfortunately the joomla installer does not have an upgrade part associated with it. So for all practical purposes it is a new install and keeping the database untouched

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

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: Fatal Error on User/Contact Synch (Joomla)
October 23, 2007, 12:24:36 pm
We're getting the same error, but on a Drupal install:

Parse error: syntax error, unexpected ',', expecting '(' in /home/username/public_html/sites/all/modules/civicrm/CRM/Contact/Form/Merge.php on line 239

We're running the most recent version of 1.8.

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: Fatal Error on User/Contact Synch (Joomla)
October 23, 2007, 08:22:46 pm
If your server is running on php4 you need to use php4 tarball of CiviCRM.

kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Fatal Error on User/Contact Synch (Joomla)

This forum was archived on 2017-11-26.