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

Creating credit card contribution (back-end) creates blank address if custom data fields are selected

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.8
    • Fix Version/s: 4.1.0
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      If custom fields are set when a back-end credit card contribution is submitted (even if it fails) a blank address is created of the primary location type.

      (to make it work on demo you can create an authorize.net account with fake details as problem occurs before it is submitted)

      The problem appears to occus in CRM_Contact_BAO_Contact::formatProfileContactParams around line 1734

      if ( is_numeric($locTypeId) && !in_array( $fieldName, $multiplFields ) ) {
      $data[$blockName][$loc]['location_type_id'] = $locTypeId;

      Easiest fix might be to add

      && !('custom_' == substr($fieldName, 7)

      to the if clause

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: