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

problem with mapping_field when name of custom field group changes

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.4.2
    • Fix Version/s: Unscheduled
    • Component/s: Import
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      Problem:
      Create a custom field group and custom field in it.
      Create an import mapping for a contact that refers to the field.
      Change the name of the custom field group.
      Try to use the import mapping and you get an error that can be traced to referring to the field.

      Diagnosis:
      civicrm_mapping.name contains ' :: [CustomGroup]' after the name of custom fields. If the title of the group changes (or at least the title in the currently active language), then on Step 2 of the contact import wizard one gets an error about line 509 of CRM/Contact/Import/Form/MapField.php:
      $defaults["mapper[$i]"] = array($mappingHeader[0], $locationId, $typeId);

      The problem seems to be that the title rather than the name of the custom field group is being used.

      I've gotten around it by changing the name in the civicrm_mapping_field.name to the new name, and the error goes away.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: