Body: <p>We tried to update contacts with a csv file on CiviCRM 5.61.2, Drupal 10.0.9 and PHP 8.1.11.
  We get the following error: <code>TypeError: CRM_Import_Parser::getFieldMetadata(): Return value must be of type array, null returned in CRM_Import_Parser-&gt;getFieldMetadata() (line 1768 of /home/ourcontext/www/crm/vendor/civicrm/civicrm-core/CRM/Import/Parser.php).</code></p>
  <p>The whole thing looks rather similiar to this other StackExchange question : <a href="https://civicrm.stackexchange.com/questions/43018/uncaught-typeerror-on-import">Uncaught TypeError on Import</a>.</p>
  <p>I also found an issue which seems related, but which affects contributions instead of contacts: <a href="https://lab.civicrm.org/dev/core/-/issues/4317" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/4317</a>
  Would a fix for that issue also solve our problem?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-02T14:12:14.713Z
Comments.Text: Are you importing data into custom fields?
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-04T11:39:25.180Z
Comments.Text: Hi @LarsSG, thank you for your reply: At least one of the target fields in the import mapping is a custom field.
Comments.UserDisplayName: Matthieu Rickly
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-04T14:17:48.243Z
Comments.Text: Did you try the import without the custom field(s) to see if that prevents the issue? Might help narrow it down.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-05T21:52:59.797Z
Comments.Text: It seems that the error was on our side: several of the fields were being mapped to "- related contact info -" instead of "- do not import -". What is not clear though is whether it used not to matter or whether there was an unintended change in the existing mapping at some point during an  upgrade to a later CiviCRM version. Anyway: thanks a lot for your time.
Comments.UserDisplayName: Matthieu Rickly
Tags: <contacts><error><import>
Title: Getting a TypeError: CRM_Import_Parser::getFieldMetadata() when importing contacts
ThreadText: # Getting a TypeError: CRM_Import_Parser::getFieldMetadata() when importing contacts
  
  (Asked by: username_0 on 2023-06-02)
  
  We tried to update contacts with a csv file on CiviCRM 5.61.2, Drupal 10.0.9 and PHP 8.1.11.
  We get the following error: `TypeError: CRM_Import_Parser::getFieldMetadata(): Return value must be of type array, null returned in CRM_Import_Parser->getFieldMetadata() (line 1768 of /home/ourcontext/www/crm/vendor/civicrm/civicrm-core/CRM/Import/Parser.php).`
  
  The whole thing looks rather similiar to this other StackExchange question : [Uncaught TypeError on Import](https://civicrm.stackexchange.com/questions/43018/uncaught-typeerror-on-import).
  
  I also found an issue which seems related, but which affects contributions instead of contacts: <https://lab.civicrm.org/dev/core/-/issues/4317>
  Would a fix for that issue also solve our problem?
  
  **Tags:** contacts, error, import
  
  > **Comments:**
  > **username_1**: Are you importing data into custom fields?  
  > **username_0**: Hi @username_1, thank you for your reply: At least one of the target fields in the import mapping is a custom field.  
  > **username_1**: Did you try the import without the custom field(s) to see if that prevents the issue? Might help narrow it down.  
  > **username_0**: It seems that the error was on our side: several of the fields were being mapped to "- related contact info -" instead of "- do not import -". What is not clear though is whether it used not to matter or whether there was an unintended change in the existing mapping at some point during an  upgrade to a later CiviCRM version. Anyway: thanks a lot for your time.  
  
  ---
  
  ## 0 answers
  
  