I am using Drupal 7.63, CiviCRM 5.9.1, Webform 7.x-4.19, Civi Webform Integration 7.x-4.26.
I have a problem with Webforms creating duplicate linked contacts when one of the fields used in the de-duplication is altered, as follows.
I set up a webform with Contact 1 as an Individual, and Contact 2 as a Household linked to Contact 1 by ‘Household Of’ Relationship. Existing Contact on Contact 2 is set to default via the Relationship.
De-dup rules are the system default Unsupervised: Individual – Email Address; Household – Household Name OR Email Address (both weight 10, threshold 10).
I observe the following – with no email address set on any contact:
If Contact 1 Existing Contact defaults to the Current logged in User, I can change the Household Name and it updates the same Household record, as expected.
If Contact 1 Existing Contact is filled using Autocomplete, Changing the Household Name results in creation of a duplicate Household record. Contact 1 remains linked to both Households. This I believe is an error.
Using Autocomplete, I can update Contact 1’s First and Last Name and the system updates the same record, as expected.
If I default Contact 1 using a cid1=123 in the URL I get the same effect as (1) above – it all works as expected.
I note the help text saying that the de-dup rules do not apply when Contact 1 is defaulted. I am not sure whether this is intended to cover the Autocomplete case, but doing so for Contact 1, but not Contact 2, seems to me to be a bug.