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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • User registration can remove contact details
Pages: [1] 2

Author Topic: User registration can remove contact details  (Read 7658 times)

Martin.Schwenke

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
User registration can remove contact details
February 27, 2010, 02:20:58 am
In recent versions of CiviCRM (originally noticed in 3.0.x), I notice that when a new Drupal user registers the profile details entered at registration time overwrite an existing contact if something like name and email address match.  This even happens if they fail to enter an address: the address recorded in their contact record is removed.

More specifically, people join our organisation by sending us a piece of paper and some $$.  We then enter them into CiviCRM as a new contact and record their membership.  One of the things we record is a street/postal address.  Some time later they sign up for our "members' site" via the Drupal user registration process and they can enter their address using the standard CiviCRM "Name and Address" profile.  If they leave their address blank at sign-up time then that actually blanks out the address in their contact record.

Apart from the inconvenience of having to drag out the original paperwork to retrieve the address, I think this is a security issue (like a DoS attack).  Someone without any privileges can fill out a registration form and cause contact information to be lost.

I know I could remove this profile from user registration but having it there is useful.  If nothing else it makes it really easy to spot registrations from spammers/pranksters because the address entered is usually rubbish.

Older CiviCRM versions used to create a duplicate contact and force the admin to merge the duplicates.  That seemed to work better for me but I can't seem to find a way changing back to that old behaviour.  I don't have "Update contact on a duplicate match?" enabled in the profile's advanced settings, so I'm not even really sure why the contact is being updated...  :(

I reported this at:

  http://issues.civicrm.org/jira/browse/CRM-5309

a while ago but Donald Lobo suggested I take this to the forum.  Hopefully this is the right board...

Thanks for any ideas...

peace & happiness,
martin

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: User registration can remove contact details
February 27, 2010, 07:47:46 am

This has been a long standing issue where we match a drupal user record on the email address and hence overwrite any other details. I'm pretty sure its not a 3.x change

would be great to get this fixed. If you can investigate and contribute a patch that would be great. Alternatively you can sponsor a developer and/or the core team to investigate and fix. I suspect this will take between 20-30 hours.

Ideally the user reg should:

1. use the dedupe rules to match rather than only email address
2. not overwrite information, i.e. ignore empty fields (this might only make sense for address fields)

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

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: User registration can remove contact details
February 28, 2010, 01:06:56 pm
I think the same behaviour occurs in Joomla too

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: User registration can remove contact details
February 28, 2010, 04:56:42 pm

hmm, we dont have profile integration with joomla registration. but it will occur if you expose profiles and have the update duplicate contact 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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User registration can remove contact details
March 02, 2010, 04:28:05 pm
In 3.2 there will be a new option for handling duplicate matches in profiles - which I think can help with this problem. There will now be 3 options for duplicate handling:

1. Issue warning and do not save
2. Update the matching contact
3. Create duplicate contact

# 3  is the new option, and using this setting should ensure that contact details are not overwritten.

You can follow this issue at: http://issues.civicrm.org/jira/browse/CRM-5134

Protect your investment in CiviCRM by  becoming a Member!

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: User registration can remove contact details
March 17, 2010, 02:08:19 am
when I said it occurs to in Joomla, may be I was referring to a slightly different scenario....

Individual registers for Event #1, filling in their name & address.  No Joomla user account is created, but a CiviCRM individual is created and their name and address stored in the database

few weeks go by

Same individual returns to register for Event #2.  They've been here before, so this time they don't bother to fill in their address details, leaving these (optional) fields blank

result:  their address details are overwritten by blanks in the database, and we've lost this information!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User registration can remove contact details
March 17, 2010, 03:54:39 pm
For the scenario above....
* I think we're supposed to NOT overwrite existing address fields if ALL submitted (profile) address fields are empty. However, I just tested this in 3.1.3 - and that's not how it's working. I've filed a 'tentative' bug report on this you can follow at: http://issues.civicrm.org/jira/browse/CRM-5969

* In any case, you can potentially make primary address fields required - and encourage them to create user account / login if they want to avoid re-entering this information. This is how most eCommerce / ticket purchasing sites work IMHO - you either create an account so you can bypass entering your info each time OR you bite the bullet and re-enter it.
Protect your investment in CiviCRM by  becoming a Member!

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: User registration can remove contact details
September 14, 2011, 04:58:15 pm
Where/how do I find the three new options?  I have looked in my profile settings but cannot seem to find "3. Create duplicate contact" (using 3.3.2)

Please advise, thanks!

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: User registration can remove contact details
September 14, 2011, 06:15:59 pm
should be in the Adv Settings in the Profile in question - so go to the list of Profiles and click on Settings for the one you are dealing with. HTH
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

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: User registration can remove contact details
September 16, 2011, 04:02:05 pm
thanks for the reply, thats what i had assumed, however I dont have any options under advanced (ie it wont expand, and when I inspect with firebug it shows no data, just accordion header )...thoughts?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User registration can remove contact details
September 17, 2011, 05:01:03 pm
Sounds like there's a configuration issue on your install preventing ajax calls from running. Firebug console should show u the attempted URL call - if you open that in a new tab you can often see the actual error message from the attempt to call that URL.
Protect your investment in CiviCRM by  becoming a Member!

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: User registration can remove contact details
September 17, 2011, 06:12:16 pm
Thanks for the reply.  i have looked for errors, none shown in firebug.  Also, other ajax headers work jsut fine inside my civi install, for example when creating an email, the dropdown that lets you preview the message before sending.

Perhaps i could set this manually in a table??

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User registration can remove contact details
September 20, 2011, 10:00:05 am
You could set the value of is_update_dupe in the civicrm_uf_group table for that specific profile ID (civicrm_uf_group.id). Values for the 3 options listed above are 0, 1, 2. However if you do a view source on Profile Settings form and do not have some of the following in the page source, I fear that something more broadly is wrong or corrupted in your install. If you do have the HTML in the source but the pane isn't opening then there is definitely a jscript error happening and you'll need to try and debug it because again i suspect it will affect other spots.
Code: [Select]
<div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-closed">
 <div class="crm-accordion-header">
    <div class="icon crm-accordion-pointer"></div>
    Advanced Settings
  </div><!-- /.crm-accordion-header -->
  <div class="crm-accordion-body">
  <div class="crm-block crm-form-block crm-uf-advancesetting-form-block">
    <table class="form-layout">

        <tr class="crm-uf-advancesetting-form-block-group">
            <td class="label"><label for="group">Limit listings to a specific Group?</label></td>
... etc.
Protect your investment in CiviCRM by  becoming a Member!

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: User registration can remove contact details
September 20, 2011, 10:18:51 am
thanks so much.  I tried again and I now have the advanced options as dropdown, this is great. Thanks for the help

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: User registration can remove contact details
September 20, 2011, 03:09:19 pm
Still lots of problems.  I believe that the new setting of allow duplicate to be created "sort of" works, ie we arent getting overwritten values (EDIT- we are still getting overwritten values), however I keep getting DB Error: already exists everytime someone uses the signup form, and Im wondering if this is related, as mentioned we are still getting overwritten values even tho create duplicate is selected for the profile.  Im not really sure where to even begin looking, any advice is appreciated.

1) We use the profile to create new Drupal accounts.  These are created everytime
2) We use contribute to offer three types of memberships.
3) I tried using a different profile, with only first and last name, same results

My fuzzy dedupe looks like this:

Email: length (not set) weight 20
Last name: length (not set) weight 10
First name: length (not set) weight 10
City: length (not set) weight 10

Threshold 50

I get the same error each time.  None of these contacts exist in Drupal or civi currently and there are no records in the trash, here is the results of 3 separate tests.  If you can give me any ideas of how to interpret this that would great!  Please advise, thanks!

<code>
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 ,  1358 , 'maikens@syntheticmedia.info' ,  2233 ) 

[nativecode=1062 ** Duplicate entry '2233-1' for key 3]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1358 , 'maikens@syntheticmedia.info' ,  2233 ) 

[nativecode=1062 ** Duplicate entry '2233-1' 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

(domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1358 , 'maikens@syntheticmedia.info' ,  2233 )  [nativecode=1062 ** Duplicate entry '2233-1' for key 3]"]
)






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 ,  1359 , 'test@syntheticmedia.info' ,  1384 ) 

[nativecode=1062 ** Duplicate entry '1384-1' for key 3]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1359 , 'test@syntheticmedia.info' ,  1384 )  [nativecode=1062

** Duplicate entry '1384-1' 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

(domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1359 , 'test@syntheticmedia.info' ,  1384 )  [nativecode=1062 ** Duplicate entry '1384-1' for key 3]"]
)




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 ,  1360 , 'test2@syntheticmedia.info' ,  1384 ) 

[nativecode=1062 ** Duplicate entry '1384-1' for key 3]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1360 , 'test2@syntheticmedia.info' ,  1384 ) 

[nativecode=1062 ** Duplicate entry '1384-1' 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

(domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  1360 , 'test2@syntheticmedia.info' ,  1384 )  [nativecode=1062 ** Duplicate entry '1384-1' for key 3]"]
)
</code>
« Last Edit: September 20, 2011, 03:43:32 pm by everything »

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • User registration can remove contact details

This forum was archived on 2017-11-26.