Answers.Body: <p>Looks like the first issue (Mismatched contact type) was to do with some stale data in the runner queue - removing those rows fixed the error.</p>
  <p>The second error &quot; &quot;'1' is not a valid option for field custom_12&quot;&quot; is a bug, which is replicable on the demo site.  When importing CSV data to a field with multiple possible defined answers (e.g. checkboxes), the import succeeds where multiple options are 'ticked' in the CSV file (i.e. an array) but fails where there is only 1 option ticked in the CSV.  i.e.:</p>
  <p><a href="https://i.sstatic.net/OWrde.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OWrde.png" alt="enter image description here" /></a></p>
  <p>In the example above, the import of the second row fails with the error described.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-09T05:17:29.093Z
Answers.Text: Robin - we are getting the "Mismatched contact type" - when it makes no sense at all. how did you determine it was 'stale data'. it is happening for every single row in our import, so not much point removing them all and retrying :-)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-16T14:47:49.157Z
Answers.LastActivityDate: 2023-02-16T14:47:49.157Z
Answers.UserDisplayName: Robin Fenwick
Answers.Body: <p>Robin - is it possible to replicate the issue on <a href="https://dmaster.demo.civicrm.org/" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/</a> - we can investigate as a bug but need to be able to replicate it (also you should log a bug over on gitlab to track it)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-15T16:04:00.827Z
Answers.Text: Thanks, Eileen, I wonder if we have somehow picked up some corruption in our databases, as imports are also failing on another CiviCRM site on the same server, but with a different error "Cannot execute queue "user_job_8". The "civicrm_queue.runner" property is missing."  I cannot replicate the error on the Demo site.
Answers.UserDisplayName: Robin Fenwick
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-14T21:38:23.570Z
Answers.LastActivityDate: 2023-02-14T21:38:23.570Z
Answers.UserDisplayName: eileen
Body: <p>I'm seeing some issues with contact importing, and I wondered if anyone else is? Civi 5.58.0 on Wordpress with PHP 7.4</p>
  <p>We have a process where we fairly regularly reimport existing contacts back into the system, using the contact update option to update the contents of custom fields, with data from a CSV file.</p>
  <ul>
  <li><p>Attempting any import of individuals using First Name &amp; Email supervised dedupe, even if only first name, last name and email is contained in the data results in all contacts failing with error &quot;Mismatched contact type.&quot; I was initially seeing this bug: <a href="https://lab.civicrm.org/dev/core/-/issues/3927" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/3927</a> but it is happening even when the update to a related contact is removed.</p>
  </li>
  <li><p>Attempting to import a list of individuals using first name &amp; email unsupervised dedupe, and also trying to update a single custom field results in all imports failing with error &quot;'1' is not a valid option for field custom_12&quot; even though &quot;1&quot; is not a value contained anywhere in the CSV</p>
  </li>
  <li><p>So far as I can see, randomly one attempted import did &quot;work&quot;, but the process erased the contents of some custom fields in Civi despite there being valid data in the CSV.</p>
  </li>
  </ul>
  <p>All was working fine before the recent security update - though the third item, where the import appeared to work, does obviously make me wonder if something is up with the server.</p>
  <p>Thank you.</p>
  
Tags: <import><core>
Title: Issues with contact importing - Mismatched Contact Type and more
ThreadText: # Issues with contact importing - Mismatched Contact Type and more
  
  (Asked by: username_0 on 2023-02-12)
  
  I'm seeing some issues with contact importing, and I wondered if anyone else is? Civi 5.58.0 on Wordpress with PHP 7.4
  
  We have a process where we fairly regularly reimport existing contacts back into the system, using the contact update option to update the contents of custom fields, with data from a CSV file.
  
  * Attempting any import of individuals using First Name & Email supervised dedupe, even if only first name, last name and email is contained in the data results in all contacts failing with error "Mismatched contact type." I was initially seeing this bug: <https://lab.civicrm.org/dev/core/-/issues/3927> but it is happening even when the update to a related contact is removed.
  * Attempting to import a list of individuals using first name & email unsupervised dedupe, and also trying to update a single custom field results in all imports failing with error "'1' is not a valid option for field custom\_12" even though "1" is not a value contained anywhere in the CSV
  * So far as I can see, randomly one attempted import did "work", but the process erased the contents of some custom fields in Civi despite there being valid data in the CSV.
  
  All was working fine before the recent security update - though the third item, where the import appeared to work, does obviously make me wonder if something is up with the server.
  
  Thank you.
  
  **Tags:** import, core
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-02-16. Score: 1
  
  Looks like the first issue (Mismatched contact type) was to do with some stale data in the runner queue - removing those rows fixed the error.
  
  The second error " "'1' is not a valid option for field custom\_12"" is a bug, which is replicable on the demo site. When importing CSV data to a field with multiple possible defined answers (e.g. checkboxes), the import succeeds where multiple options are 'ticked' in the CSV file (i.e. an array) but fails where there is only 1 option ticked in the CSV. i.e.:
  
  [![enter image description here](https://i.sstatic.net/OWrde.png)](https://i.sstatic.net/OWrde.png)
  
  In the example above, the import of the second row fails with the error described.
  
  > **Comments:**
  > **username_1**: username_0 - we are getting the "Mismatched contact type" - when it makes no sense at all. how did you determine it was 'stale data'. it is happening for every single row in our import, so not much point removing them all and retrying :-)  
  
  ---
  
  ### Answer by username_2 on 2023-02-14. Score: 0
  
  username_0 - is it possible to replicate the issue on <https://dmaster.demo.civicrm.org/> - we can investigate as a bug but need to be able to replicate it (also you should log a bug over on gitlab to track it)
  
  > **Comments:**
  > **username_0**: Thanks, username_2, I wonder if we have somehow picked up some corruption in our databases, as imports are also failing on another CiviCRM site on the same server, but with a different error "Cannot execute queue "user_job_8". The "civicrm_queue.runner" property is missing."  I cannot replicate the error on the Demo site.  
  
  ---
  
  