2

We are using Hampsink's 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

2
  • Not familiar with the plugin you're using so I can't answer, but have you tried Feed Me? Commented Sep 15, 2016 at 17:23
  • Yes. Feed Me will not work with our particular CSV data. It's a long story. But thanks for helping out.
    – Steve Mock
    Commented Sep 15, 2016 at 17:53

1 Answer 1

1

It's the modifyImportRow hook. If one uses that sample code in the Read Me, 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.