Answers.Body: <p>Created jira <a href="https://issues.civicrm.org/jira/browse/CRM-17994" rel="nofollow noreferrer">CRM-20731</a>.  </p>
  
  <p>This problem also sort of exists with creating a new contact without an address.  The contact will get an address record with only the country and state province. I included this in the jira as well since it's likely the same core code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-14T05:33:04.363Z
Answers.Text: You says 'also exists' but jira is marked as Completed. Can you update your ticket to confirm if this is Fixed or not. thx
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-15T02:31:45.587Z
Answers.Text: In haste I grabbed the wrong number.  I've edited it.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-15T04:55:57.617Z
Answers.Text: thanks very much he says typing more words to get paste the minimum allowed ;-)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-13T23:40:18.813Z
Answers.LastActivityDate: 2017-06-15T02:30:52.230Z
Answers.LastEditDate: 2017-06-15T02:30:52.230Z
Answers.UserDisplayName: Paul-Tahoe
Answers.Body: <p>I'm working on WordPress 4.9.1 and CiviCRM 4.7.27. I'm seeing the same behaviour which can be replicated on the demo WordPress site. It's not only the address fields that are affected, it's also other fields as well, specifically custom fields.</p>
  
  <p>If those fields are on the profile and you don't populate them, then they will all be blanked on a save. This is not good as we'd like to use volunteers to change select information but don't want to create a whole bunch of profiles for different scenarios. We'd like to present all info that they can change and then have them change only things that need changing.</p>
  
  <p>It doesn't matter whether the state/province default is set or not. So our only recourse rights now to make things easier for volunteers is to create a duplicate record and then have an administrator go in and merge those records on a periodic basis.</p>
  
  <p>I see that this bug has supposedly been solved, but it sure doesn't seem so.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-04T22:46:03.707Z
Answers.LastActivityDate: 2018-01-04T22:46:03.707Z
Answers.UserDisplayName: Rachelle Niemela
Answers.Body: <p>this doesn't sound right. and i just checked on demo. gave user 'demo' a first and last name, added a address profile, filled it in incognito such that the match would pick it up, which it did, and I can confirm that demo did not have his (?) address overwritten as a result of leaving the profile address fields blank. </p>
  
  <p>You can give it a go here to confirm (or point out i missed something)</p>
  
  <p>check his address first (or give him one if system gets wiped before you get there) at </p>
  
  <p><a href="http://dmaster.demo.civicrm.org/civicrm/contact/view?reset=1&amp;cid=202" rel="nofollow">http://dmaster.demo.civicrm.org/civicrm/contact/view?reset=1&amp;cid=202</a></p>
  
  <p>( also if system has been reset add Name and Address field at <a href="http://dmaster.demo.civicrm.org/civicrm/admin/contribute/custom?reset=1&amp;action=update&amp;id=1" rel="nofollow">http://dmaster.demo.civicrm.org/civicrm/admin/contribute/custom?reset=1&amp;action=update&amp;id=1</a>)</p>
  
  <p>then go to this incognito to </p>
  
  <p><a href="http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&amp;id=1" rel="nofollow">http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&amp;id=1</a></p>
  
  <p>and use first = demo, last = demo, email = demo@example.com to ensure match. then see outcome.</p>
  
  <p>oh also if reset, make the contribution page have Pay Later so you can skip cc.</p>
  
  <p>hth</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-17T16:34:49.413Z
Answers.Text: I found the problem.  If you have both a default country and state/province set in localization => Languages, Currency, Locations, it will do as I described.  If you only have a country set it works correctly (demo only has country set).   Now that I think about it I've noticed we have a number of people with only a country and state for address, which seems kind of wrong, e.g. don't set an address if only country and state is provided.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-18T05:21:09.437Z
Answers.Text: maybe worth reporting in jira if you are sure of that as it sounds like unexpected and unwanted outcome
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-11T22:40:10.533Z
Answers.Text: and worth adding as your own answer and accepting so SE is happier about having Questions that have accepted or upvoted answers
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-17T05:04:29.613Z
Answers.LastActivityDate: 2016-02-17T05:04:29.613Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I've setup a contribution page and made a link to it.  I include a profile that includes things like address.  The matching is set to update.  If someone who already in civi goes to the donate page and only fills in the name and email address, leaving the street address blank, it will match and then null out the address that was there.  </p>
  
  <p>I'd like it to only update the fields if the user enters something in the field.</p>
  
  <p>I don't really want to give everyone a drupal login and make them login first.  We want to make donating as easy as possible.</p>
  
  <p>We're using paypal so a lazy person who knows that and that they'll login to their paypal account and that it will pull up their address info, won't bother to enter it on the donate page.  Interesting, if they do that either paypal doesn't send back the address info or civi doesn't do anything with it.</p>
  
  <p>civicrm 4.5.8 (testing 4.6.11)</p>
  
Tags: <profile><contribution-page>
Title: How do I prevent blank fields on a profile from overwriting existing data when using the profile to register or donations from existing contacts?
ThreadText: # How do I prevent blank fields on a profile from overwriting existing data when using the profile to register or donations from existing contacts?
  
  (Asked by: username_0 on 2016-02-17)
  
  I've setup a contribution page and made a link to it. I include a profile that includes things like address. The matching is set to update. If someone who already in civi goes to the donate page and only fills in the name and email address, leaving the street address blank, it will match and then null out the address that was there.
  
  I'd like it to only update the fields if the user enters something in the field.
  
  I don't really want to give everyone a drupal login and make them login first. We want to make donating as easy as possible.
  
  We're using paypal so a lazy person who knows that and that they'll login to their paypal account and that it will pull up their address info, won't bother to enter it on the donate page. Interesting, if they do that either paypal doesn't send back the address info or civi doesn't do anything with it.
  
  civicrm 4.5.8 (testing 4.6.11)
  
  **Tags:** profile, contribution-page
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2017-06-13. Score: 1 | Accepted answer
  
  Created jira [CRM-20731](https://issues.civicrm.org/jira/browse/CRM-17994).
  
  This problem also sort of exists with creating a new contact without an address. The contact will get an address record with only the country and state province. I included this in the jira as well since it's likely the same core code.
  
  > **Comments:**
  > **username_1**: You says 'also exists' but jira is marked as Completed. Can you update your ticket to confirm if this is Fixed or not. thx  
  > **username_0**: In haste I grabbed the wrong number.  I've edited it.  
  > **username_1**: thanks very much he says typing more words to get paste the minimum allowed ;-)  
  
  ---
  
  ### Answer by username_2 on 2018-01-04. Score: 1
  
  I'm working on WordPress 4.9.1 and CiviCRM 4.7.27. I'm seeing the same behaviour which can be replicated on the demo WordPress site. It's not only the address fields that are affected, it's also other fields as well, specifically custom fields.
  
  If those fields are on the profile and you don't populate them, then they will all be blanked on a save. This is not good as we'd like to use volunteers to change select information but don't want to create a whole bunch of profiles for different scenarios. We'd like to present all info that they can change and then have them change only things that need changing.
  
  It doesn't matter whether the state/province default is set or not. So our only recourse rights now to make things easier for volunteers is to create a duplicate record and then have an administrator go in and merge those records on a periodic basis.
  
  I see that this bug has supposedly been solved, but it sure doesn't seem so.
  
  
  ---
  
  ### Answer by username_1 on 2016-02-17. Score: 0
  
  this doesn't sound right. and i just checked on demo. gave user 'demo' a first and last name, added a address profile, filled it in incognito such that the match would pick it up, which it did, and I can confirm that demo did not have his (?) address overwritten as a result of leaving the profile address fields blank.
  
  You can give it a go here to confirm (or point out i missed something)
  
  check his address first (or give him one if system gets wiped before you get there) at
  
  <http://dmaster.demo.civicrm.org/civicrm/contact/view?reset=1&cid=202>
  
  ( also if system has been reset add Name and Address field at <http://dmaster.demo.civicrm.org/civicrm/admin/contribute/custom?reset=1&action=update&id=1>)
  
  then go to this incognito to
  
  <http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=1>
  
  and use first = demo, last = demo, email = demo@example.com to ensure match. then see outcome.
  
  oh also if reset, make the contribution page have Pay Later so you can skip cc.
  
  hth
  
  > **Comments:**
  > **username_0**: I found the problem.  If you have both a default country and state/province set in localization => Languages, Currency, Locations, it will do as I described.  If you only have a country set it works correctly (demo only has country set).   Now that I think about it I've noticed we have a number of people with only a country and state for address, which seems kind of wrong, e.g. don't set an address if only country and state is provided.  
  > **username_1**: maybe worth reporting in jira if you are sure of that as it sounds like unexpected and unwanted outcome  
  > **username_1**: and worth adding as your own answer and accepting so SE is happier about having Questions that have accepted or upvoted answers  
  
  ---
  
  