Body: <p>I'm using the Import Multi-value Custom Data screen (civicrm/import/custom?_qf_MapField_display=true) and it does work, but it is not saving the field mapping. There is the following error:</p>
  <pre><code>Warning: Declaration of CRM_Custom_Import_Parser::run($fileName, $separator, &amp;$mapper, $skipColumnHeader = false, $mode = self::MODE_PREVIEW, $contactType = self::CONTACT_INDIVIDUAL, $onDuplicate = self::DUPLICATE_SKIP) should be compatible with CRM_Contact_Import_Parser::run($tableName, $mapper = Array, $mode = self::MODE_PREVIEW, $contactType = self::CONTACT_INDIVIDUAL, $primaryKeyName = '_id', $statusFieldName = '_status', $onDuplicate = self::DUPLICATE_SKIP, $statusID = NULL, $totalRowCount = NULL, $doGeocodeAddress = false, $timeout = CRM_Contact_Import_Parser::DEFAULT_TIMEOUT, $contactSubType = NULL, $dedupeRuleGroupID = NULL) in require_once() (line 17 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Custom/Import/Parser.php).
  </code></pre>
  <p>There are also additional errors for each field used in the import:</p>
  <pre><code>Warning: Invalid argument supplied for foreach() in CRM_Custom_Import_Parser_Api-&gt;import() (line 180 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Custom/Import/Parser/Api.php).
  </code></pre>
  <p>I reproduced this error on the dmaster demo site and am using the errors from this site.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-30T19:40:01.123Z
Comments.Text: There is an issue for this at https://lab.civicrm.org/dev/core/-/issues/1771 (raised by me!)
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-01T11:21:54.503Z
Comments.Text: Thanks Andy for the reference. I guess custom multi-value imports are fairly rare?! I din't even know that import existed in Civi! It's quite a hidden function to find.
Comments.UserDisplayName: Ben
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-01T12:28:26.310Z
Comments.Text: I was setting them up for people to import Gift Aid Declarations, so this problem made that difficult
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-01T08:47:40.630Z
Comments.Text: Is the mapping not saved? I don't see it in the drop-down list at the first step of the import, but I can see it in civicrm_mapping table. If I add '2' in mapping_type_id
  field, I can select it during the first step of the import.
Comments.UserDisplayName: Alain Rihs
Tags: <error><import><multi-record>
Title: Field Mapping Not Saved When Importing Multi-Value Custom Data
ThreadText: # Field Mapping Not Saved When Importing Multi-Value Custom Data
  
  (Asked by: username_0 on 2020-11-30)
  
  I'm using the Import Multi-value Custom Data screen (civicrm/import/custom?\_qf\_MapField\_display=true) and it does work, but it is not saving the field mapping. There is the following error:
  
  ```
  Warning: Declaration of CRM_Custom_Import_Parser::run($fileName, $separator, &$mapper, $skipColumnHeader = false, $mode = self::MODE_PREVIEW, $contactType = self::CONTACT_INDIVIDUAL, $onDuplicate = self::DUPLICATE_SKIP) should be compatible with CRM_Contact_Import_Parser::run($tableName, $mapper = Array, $mode = self::MODE_PREVIEW, $contactType = self::CONTACT_INDIVIDUAL, $primaryKeyName = '_id', $statusFieldName = '_status', $onDuplicate = self::DUPLICATE_SKIP, $statusID = NULL, $totalRowCount = NULL, $doGeocodeAddress = false, $timeout = CRM_Contact_Import_Parser::DEFAULT_TIMEOUT, $contactSubType = NULL, $dedupeRuleGroupID = NULL) in require_once() (line 17 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Custom/Import/Parser.php).
  
  ```
  
  There are also additional errors for each field used in the import:
  
  ```
  Warning: Invalid argument supplied for foreach() in CRM_Custom_Import_Parser_Api->import() (line 180 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Custom/Import/Parser/Api.php).
  
  ```
  
  I reproduced this error on the dmaster demo site and am using the errors from this site.
  
  **Tags:** error, import, multi-record
  
  > **Comments:**
  > **username_1**: There is an issue for this at https://lab.civicrm.org/dev/core/-/issues/1771 (raised by me!)  
  > **username_0**: Thanks username_1 for the reference. I guess custom multi-value imports are fairly rare?! I din't even know that import existed in Civi! It's quite a hidden function to find.  
  > **username_1**: I was setting them up for people to import Gift Aid Declarations, so this problem made that difficult  
  > **username_2**: Is the mapping not saved? I don't see it in the drop-down list at the first step of the import, but I can see it in civicrm_mapping table. If I add '2' in mapping_type_id field, I can select it during the first step of the import.  
  
  ---
  
  ## 0 answers
  
  