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

Contact export: cannot export addresses with location types with non-US-ascii names

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.15
    • Fix Version/s: None
    • Component/s: Internationalisation
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      When an address location has an accent in it, it is possible to export the data in those address fields.

      How to reproduce:

      The resulting CSV will have an empty "city" field.

      If you go back to location types, and change back to "other", or anything else without an accent, it will export OK.

      I tried debugging this, but got lost in the SQL. This was a red flag:

      "Expédition-address.street_address as Expédition-street_address" (my location type is "Expédition").

      In CRM/Export/BAO/Export.php line ~ 327, the locations are fetched with:

            $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
      

      In in those locationTypes, the values are keyed with "[id] => label". I suspect that is a big part of the bug.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: