craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
286 stars 140 forks source link

Unable to import a Categories array #1455

Closed daniellelecomte closed 1 month ago

daniellelecomte commented 1 month ago

Description

Trying to import categories on entries within a CSV file. I have tried the following formats:

Cat 1, Cat 2
[Cat 1,Cat 2]
['Cat 1','Cat 2']

The first one will work but only imports the first category and ignores any additional ones. I've also tried using the category IDs instead of the titles with the same result.

Additional info

i-just commented 1 month ago

Hi, thanks for getting in touch!

When using CSV file to import your data, commas are used (by default) to separate the columns in the CSV. To separate the data inside a column, you need to use a different separator. By default, Feed Me uses -|-, and you can change it via dataDelimiter. If you use the default delimiter, then Cat 1-|-Cat 2 should work as you expect it to.

You can find more about the configuration options here.

I hope this helps!