We are currently on vacation until 13th May 2024, ticket responses maybe be longer than normal during this period, sorry for any inconvenience.

export of custom post type with custom taxonomy not inserting commas between entries

Closed

Import WP Pro Updated 1 month ago 8 Replies

H asked 1 month ago on March 28, 2024 at 4:53 pm

I have a custom post type with a few ACF taxonomies which allow for multiple selections within a taxonomy. For one of the custom taxonomies (Age), the multiple selections are not separated by a comma when I export the custom post type.  The Age taxonomy is not Hierarchical.

How do I get the export to generate with commas separating the values.

For example, if ages 10, 11, 12, and 13 are selected, the export of both tax_age.name and tax_age.slug is

10111213

Here is an export of the Taxonomy: Age

term_id name slug
58 10 10
59 11 11
60 12 12
61 13 13
62 14 14
63 15 15
64 16 16
65 17 17
66 18 18
212 19 19
213 20 20
214 21 21
215 22 22
216 23 23
217 24 24
218 25 25
67 5 5
54 6 6
55 7 7
56 8 8
57 9 9

 

Thank you.

J

James replied Support Agent

1 month ago on March 30, 2024 at 9:10 pm

Hi,

When you are exporting the custom post type, are you exporting all fields or have you selected specific ones?

As an example, using posts and categories (screenshot of example categories attached), If i had the Test 1.1.1 category attached to a post, when exporting posts, if you select the hierachy::id , hierarchy::slug , or hierarchy::name, this will export a hierachy list of the categories e.g.:

post_title,tax_category.hierarchy::name,ID
"Hello world!","Test 1 > Test 1.1 > Test 1.1.1,Uncategorized",1

HI

H replied

1 month ago on March 30, 2024 at 9:23 pm

Thank you for your reply.

I am exporting all fields.

Both the custom post type and the Age taxonomy are flat.  There is no heirarchy.

 

HI

H replied

1 month ago on March 30, 2024 at 9:28 pm

Here is a screenshot of the ages which are selected for the top row of the export results in the previous reply.

J

James replied Support Agent

1 month ago on March 30, 2024 at 9:28 pm

Are you able to export your acf field groups / taxonomies / post types: https://utilizewp.com/export-import-acf-field-group/

HI

H replied privately

1 month ago on March 30, 2024 at 11:10 pm

J

James replied Support Agent

1 month ago on March 31, 2024 at 7:27 pm

Thank you, i have just tested this with a basic setup and your acf import and everything seems to export correctly when exporting the time posts post_type.

Can you confirm what your delimiter, enclosure, and escape characters are set to?

Can you export a fresh csv and attach it to the ticket so i can see if there is anything else broken that might help me diagnose this.

HI

H replied

1 month ago on April 2, 2024 at 8:26 pm

Thank you for your response.  I have confirmed the following:

delimiter:  ,

enclosure:  "

escape char:  \

More importantly, I have realized that the age field was being imported into Excel as a number field rather than a text field, and as such, the commas were being removed.  By switching the import of the Age field to text, the commas are included.

I appreciate the time you spent helping me.

J

James replied Support Agent

1 month ago on April 2, 2024 at 8:28 pm

Thank you for letting me know, I am glad you have this resolved.