Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.1
-
Component/s: Core CiviCRM
-
Labels:None
Description
I'm using crm_uf_get_profile_html_by_id() to get the profile form. My profile has the primary country. My primary address is work. And my contact has a work country. However, I've duplicated this problem when the profile specifically looks for a work country, so the problem appears to not be related to the use of "primary."
crm_uf_get_profile_html_by_id() is filling in the default country instead of using the address set in the contact. I think that this is because the check for <code>! $value['country_id']</code> is done when on locations other than what we are looking for in the profile.
Patch attached.