Answers.Body: <p>It's the <strong>modifyImportRow</strong> hook. If one uses that sample code in the <a href="https://github.com/boboldehampsink/import/blob/develop/README.md" rel="nofollow">Read Me</a>, related categories will not import.</p>
  
  <p>So we will have to run at least two imports, one with our Import Helper that uses the hook enabled  (for tables, booleans, dates, etc.), and one without, in order to append the related categories.</p>
  
  <p>Unless someone can provide better example code to exclude an entry category field, but I can't think of how right now.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-15T17:55:19.557Z
Answers.LastActivityDate: 2016-09-15T17:55:19.557Z
Answers.UserDisplayName: Steve Mock
Body: <p>We are using Hampsink's <a href="https://github.com/boboldehampsink/import" rel="nofollow">Import</a> plug-in (0.8.33) and we have a very simple CSV for testing. One row, three columns. One of these columns contains a comma-separated list of categories. These are top level, no heiarchy.</p>
  
  <p>We've tried the titles:</p>
  
  <pre><code>Provider Id,Provider Name,Service Areas
  62686,Walgreens,"Defiance County,Erie County,Fulton County,Henry County,Lucas County,Ottawa County,Paulding County,Sandusky County,Williams County,Wood County"
  </code></pre>
  
  <p>We've tried the slugs:</p>
  
  <pre><code>Provider Id,Provider Name,Service Areas
  62686,Walgreens,"defiance-county,erie-county,fulton-county,henry-county,lucas-county,ottawa-county,paulding-county,sandusky-county,williams-county,wood-county"
  </code></pre>
  
  <p>Category field always ends up blank after an otherwise successful import.</p>
  
  <p>Yes, categories are set and have their own URL. Since there is no heirarchy, that is set to simply <code>{slug}</code></p>
  
  <p>We've read the several, several related posts and questions about this and there seems to be a lot of frustration around importing entries with categories. Yet still... What are we doing wrong? What's the trick? </p>
  
  <p>Craft CMS 2.6.2931</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-15T17:23:31.250Z
Comments.Text: Not familiar with the plugin you're using so I can't answer, but have you tried [Feed Me](https://github.com/engram-design/FeedMe)?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-15T17:53:46.893Z
Comments.Text: Yes. Feed Me will not work with our particular CSV data. It's a long story. But thanks for helping out.
Comments.UserDisplayName: Steve Mock
Tags: <categories><import>
Title: What's the trick to importing an entry with a categories field?
ThreadText: # What's the trick to importing an entry with a categories field?
  
  (Asked by: username_0 on 2016-09-15)
  
  We are using Hampsink's [Import](https://github.com/boboldehampsink/import) plug-in (0.8.33) and we have a very simple CSV for testing. One row, three columns. One of these columns contains a comma-separated list of categories. These are top level, no heiarchy.
  
  We've tried the titles:
  
  ```
  Provider Id,Provider Name,Service Areas
  62686,Walgreens,"Defiance County,Erie County,Fulton County,Henry County,Lucas County,Ottawa County,Paulding County,Sandusky County,Williams County,Wood County"
  
  ```
  
  We've tried the slugs:
  
  ```
  Provider Id,Provider Name,Service Areas
  62686,Walgreens,"defiance-county,erie-county,fulton-county,henry-county,lucas-county,ottawa-county,paulding-county,sandusky-county,williams-county,wood-county"
  
  ```
  
  Category field always ends up blank after an otherwise successful import.
  
  Yes, categories are set and have their own URL. Since there is no heirarchy, that is set to simply `{slug}`
  
  We've read the several, several related posts and questions about this and there seems to be a lot of frustration around importing entries with categories. Yet still... What are we doing wrong? What's the trick?
  
  Craft CMS 2.6.2931
  
  **Tags:** categories, import
  
  > **Comments:**
  > **username_1**: Not familiar with the plugin you're using so I can't answer, but have you tried [Feed Me](https://github.com/engram-design/FeedMe)?  
  > **username_0**: Yes. Feed Me will not work with our particular CSV data. It's a long story. But thanks for helping out.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-09-15. Score: 1 | Accepted answer
  
  It's the **modifyImportRow** hook. If one uses that sample code in the [Read Me](https://github.com/boboldehampsink/import/blob/develop/README.md), related categories will not import.
  
  So we will have to run at least two imports, one with our Import Helper that uses the hook enabled (for tables, booleans, dates, etc.), and one without, in order to append the related categories.
  
  Unless someone can provide better example code to exclude an entry category field, but I can't think of how right now.
  
  
  ---
  
  