Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3262

Profile form uses default country when a country is set

    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.

        Attachments

        1. crm3262.module
          2 kB
          Doug Green
        2. CRM-country.patch
          2 kB
          Doug Green

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              douggreen Doug Green
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: