I am trying to import and relate many CPTs of type 'rep' and type 'manufacturer'
I have successfully imported reps, and manufacturers, but now i am trying to relate them, using CSV ultimate importer.
hidden link
This file updates the rep here: hidden link you can see that the import caused a PHP error. Could you explain why this is?
you can feel free to delete the post and try the import over again.
If you do not include the related posts, or relationship slug in the import - it will work fine, and all the other fields import just fine. the problem is with the related posts.
if you do try to relate posts, most times the import won't even finish.
the many-to-many relationship uses an intermediary post to store data, which i also need to import. So I tried to import intermediary posts. I was able to do so using this file hidden link. here is an example of the intermediary post that imported hidden link this intermediary post is related to hidden link however it does not show up in the related posts when editing hidden link, even before it errored.
what is the process I should use? Should I import manufacturers, then reps with related manufacturers, then intermediary posts?
I tried almost every combination listed here: https://toolset.com/documentation/user-guides/export-import/how-to-import-content-into-wordpress-using-csv/import-csv-ultimate-csv-importer-plugin/how-to-import-posts-from-csv-files-and-maintain-relationships-when-using-the-csv-importer-plugin/ nothing seems to work.
here is a temporary login link: hidden link
Hi Branden,
Thank you for contacting us and I'd be happy to assist.
Based on your report, I'll need to perform some tests on my website with the example CSV files and the steps you've shared.
I'll share my findings as soon as this testing completes.
Thank you for your patience.
regards,
Waqar
thank you. I have made an example post with example data to hopefully help you. hidden link
hello, I think I can accomplish what i want to with the following work flow
1. import all reps
2. import all manufacturers
3. import intermediary posts that relate them
do you think this is correct?
however I think the primary problem is that the titles of my intermediary posts have commas in them.
I have attached an export of one such relationship. you'll notice that the file exports with an extra comma in the intermediary column (column T). this causes the relationship to break when importing.
hidden link
is it possible to relate based on slug or post id instead of title? if so, what is the syntax to use?
i think this is the way to move forward, so i have made a list of manufacturers to import.
this import is causing problems, and manufacturer posts will not display in the loop after. could you help me understand why?
here is the loop: hidden link
here is the file: hidden link
Edit: disregard this last comment, i see it was a pagination problem.
I have found my issues they were. in case anyone else happens on this thread:
- post titles can not have commas or apostrophes in order to be properly related by an intermediary import
- there can not be entries in the media library with the same title as the post you want to relate to otherwise it might try to relate to the media post
- a safer way is to use the post ID rather than the title
Hi Branden,
Thank you for sharing your findings and they sure will help other users looking for similar information.
I apologize, I couldn't follow-up on this sooner, but glad you figured it all out on your own - well done.
The main takeaway here is that the post IDs should be preferred over post titles (whenever possible), as that is more reliable/safer.
regards,
Waqar