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 CiviEvent (Moderator: Yashodha Chaku) »
  • Wrong contact record gets updated during event registration
Pages: [1]

Author Topic: Wrong contact record gets updated during event registration  (Read 6771 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Wrong contact record gets updated during event registration
September 11, 2014, 05:49:34 pm
When an anonymous user registers for an event and provides their first name, last name and email address as part of registering online, an existing contact record gets updated when the existing contact has the same email address.    Yet I have the "individual unsupervised" dedupe rule and the "individual supervised" dedup rule both configured as follows:
 
First Name  10
 Last Name  10
 email           10
 Threshold: 30

Since the first name of the participant does NOT match the first name of the existing contact, I would assume the system should create a new contact record for the participant.   Yet this is not what is happening.   (In this scenario the  first last, last name and email (ie all 3) do NOT match any existing contact.      Only the last name and email match an existing contact, but its not the same person.

For example: George Jetson (jetsonfamily@yahoo.com) is already in the database.    His wife Jane is NOT in the database.   Jane goes online (as an anonymous user) and registers for an event, filling out the form as "Jane Jetson" (jetsonfamily@yahoo.com)    Her contact data overwrites George's record!
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Wrong contact record gets updated during event registration
September 12, 2014, 01:15:18 pm
HI EPG this may be your issue. if a contact has multiple emails they each get counted.

So I recommend the Rule be

First = 10
Last = 10
Email = 2

Threshold = 22

THat way a contact would have to have the same  LAST and 6 x emais

With
First  10
Last 10
Email 10

Threshold 30

it would only require LAST and 2 x email - which is pretty common eg email home and email billing

Is that the problem

Can you see how documentation could be improved to make this clearer since it comes up pretty often.

Then again, it might be something completely different in your case :P
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Wrong contact record gets updated during event registration
September 12, 2014, 08:10:51 pm
The existing contact that got incorrectly overwritten only had one email address. As a precaution, I changed the email weight to "2" and the rule threshold to "22". But that did not solve my issue.

Something weird: This only happens when the participant is not yet in the database.  If there are 2 contacts already in the database ( ie George and Jane) then Jane registers for the event as an anonymous user the correct record gets updated.  Seems odd that the issue only occurs when Jane did not have a contact record  beforehand.

Could the dedupe rule "name" have any impact?
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Wrong contact record gets updated during event registration
September 12, 2014, 08:18:12 pm
Quote from: epg on September 12, 2014, 08:10:51 pm
Could the dedupe rule "name" have any impact?

sorry don't follow - what matters is that the rule that you are editing is the one that it is using - also just to be sure - paste your url - since there is option to put cid=0 etc in url which will change behaviour - doubt that it is but then asking offbeat questions is what head scratching can result in
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Wrong contact record gets updated during event registration
September 15, 2014, 11:54:58 am
The URL to the event is:
http://mygroup.org/civicrm/event/register?id=127&reset=1

BTW:
Found something off in the file "CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php" in function "record".  This function seems hard-coded to only check on email address alone. (it ignores the rule configuration in the database.)

The SQL from that function is:
SELECT contact.id as id1, {$rg->threshold} as weight
                FROM civicrm_contact as contact
                  JOIN civicrm_email as email ON email.contact_id=contact.id
                WHERE contact_type = 'Individual'
                  AND email = %1
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

pminf

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.6
  • PHP version: 5.3
Re: Wrong contact record gets updated during event registration
September 15, 2014, 11:48:29 pm
I've noticed this problem a while ago: http://forum.civicrm.org/index.php/topic,30964.msg132890.html. It seems to be fixed in the upcomming version 4.5 (https://issues.civicrm.org/jira/browse/CRM-14134).

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Wrong contact record gets updated during event registration
September 16, 2014, 08:01:03 am
I think this is a different bug as it happens whether the checkbox "Allow multiple registrations from the same email address?"  is checked or not checked.  I changed that one SQL statement to check for first name, last name and email and that solved the bug for me.   My solution is written up in the JIRA at: https://issues.civicrm.org/jira/browse/CRM-15312
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Wrong contact record gets updated during event registration

This forum was archived on 2017-11-26.