Skip Navigation

[Resolved] My CPT doesn't show up in the "Select Post Type" list when importing CSV

This support ticket is created 8 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 15 replies, has 2 voices.

Last updated by Beda 8 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#415361

1. I escaped my CSV cell contents using BBEdit now and still got a fail.

I apologize, I am not familiar with that Tool.
Toolset does not provide the Tools to create those CSV Files, the whole purpose of that Document is to show how to import a content to a Toolset Driven Website, and this is working.
The issue with teh wrong CSV File will be adressed today.

2. Here are my first 2 lines:

"csv_post_title","csv_post_post","csv_post_excerpt","wpcf-name","wpcf-street","wpcf-city","wpcf-zip","wpcf-st","wpcf-url","wpcf-phone","csv_post_categories","csv_post_type"
"Benton H. Wilcoxon Municipal Ice Complex","excerpt","Benton H. Wilcoxon Municipal Ice Complex","3185 Leeman Ferrry Rd.","Huntsville","35801","AL","<em><u>hidden link</u></em>","256-883-3774","arena","arena"

This Code is wrong.
As you see, you do:

"csv_post_title","csv_post_post","csv_post_excerpt",

and then:

"Benton H. Wilcoxon Municipal Ice Complex","excerpt","Benton H. Wilcoxon Municipal Ice Complex",

You actually insert "excerpt" as post body.
This will not produce a error but it's not what you want, I assume.

Additionally you miss one field's content, it's not even empty, it's simply inexistent.
Of course that will give an error.
Also given that, the Import will try to put a URL into a phone Field, or whatever, the sequence is messed up.
Perhaps you set validation on the Fields (URL as example) and that would also throw errors.

Below is a corrected, simple syntax of your above example.
I had to put placeholder as content to show what I mean.

"csv_post_title","csv_post_post","csv_post_excerpt","wpcf-name","wpcf-street","wpcf-city","wpcf-zip","wpcf-st","wpcf-url","wpcf-phone","csv_post_categories","csv_post_type"
"This is the Post Title","This is the Post Body","This is the Post except","This is wpcf-name","This is wpcf-street","This is wpcf-city","6001","This is wpcf-st","<em><u>hidden link</u></em>","077223344","category-term","arena"

This import worked flawlessly.

3. Beda, could you please escalate this issue if we've reached a dead end?

We do escalate Tickets to our 2nd Tier and DEV team when there are Bugs, or we from the 1st Tier are at the end of our Knowledge and need asssistance to help you as a user more effectively.
Neither of those Conditions are met yet.
I of course, as above stated, already made everythign happen so today we can upload the correct CSV to our DOC.

4. Something about the second row of my database keeps it from importing. Is there an imposed title length? (it has a long title.) Something about it won't even let me post it here as code.

The WordPress SLUGS should be resticted to 20o characters maximally and a Post Type Slug to 20, a Taxonomy to 32. Meta Key to 255 and Term Meta to 200, if I am not wrong.

This are not Toolset Rules and you can query about those in the WordPress Codex.

5. I'm going to post this and then try to post the code.. the last attempts at posting code have failed and destroyed the post along with it

This is strange.
Can you paste the Code you wanted to pass me in pastebin.com and show me it?
It might be a issue with special characters, although we paste usually quiet complex Code here and it works.

6. Your instructions for the Windows Excel Program are probably correct, I am sorry that I can not confirm them since I use Mac and as said, I edit the files differently.

I will tell the Documentation Responsible to avoid telling the Users to use "this or that tool".
We can not control how all those toolse work, and the goal of our Document is to show how to format OUR data, not how to use Excel.
I apologize that this is not something we can cover.
I will make sure a proper workflow is instructed.

7. Some comments I can make about your findings:

-No fields can be blank.

This might be for Excel, but the CSV Plugin CAN import empty Fields, but the MUST exist as slug and value, which means (assuming a CSV of only ONE data set, which of course would neeed to be enriched with title, type, etc):
- This works (empty, but present value):
"csv_post_excerpt",""
OR
"wpcf-url",""
- This breaks:
"csv_post_excerpt","wpcf-url"
(there is NO "" value)

-If this is third party data, there are probably a lot of errors in it, including extra separators in some rows. It won't import. The formatting has to be perfect.

We mention this in on the DOC:
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/ > Create the Post Fields for the Content Import
I will add there that also 3rd party Data might be differntly formatted.
We can not control this.
Neither can CSV Importer.

Thank you for your patience and Understanding.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.