Skip Navigation

[Resolved] import custom post with two relationships using ultimate csv importer pro

This support ticket is created 3 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1889535
Screen Shot 2020-12-29 at 3.15.54 PM.png
Screen Shot 2020-12-29 at 3.15.22 PM.png
Screen Shot 2020-12-29 at 3.11.23 PM.png
Screen Shot 2020-12-29 at 3.10.18 PM.png
Screen Shot 2020-12-29 at 3.09.47 PM.png

Tell us what you are trying to do?
import custom post with two relationships using ultimate csv importer pro

a "street" custom post
a "city" custom post
a "delivery-condition" custom post

street many >to> one city, rel-slug = city-street
street many >to> one delivery-condition, rel-slug = delivery-condition-street

in the csv
types_relationship
delivery-condition-street|city-street

relationship_slug
חיפה איזור 1|חיפה

when importing with 2 of the rel' in each column it imports with only the first rel'
when tried with only 1 rel' it duplicated all of the posts

how should i import 2 relationships when importing the street custom post?

What is the link to your site?
changba.binet.co.il

#1889765

My issue is resolved now. Thank you!

rewritten the csv using post id instead of title (the ultimate csv pro export is outputting the relationship slug as the post title and not an id)
the posts titles are in hebrew with spaces

but when i imported with id as relationship slug, it added the relationship post parent to the existing one

#1889817
Screen Shot 2020-12-29 at 7.48.19 PM.png
Screen Shot 2020-12-29 at 7.49.06 PM.png
Screen Shot 2020-12-29 at 7.47.28 PM.png

ultimate csv importer pro is outputing the types_relationship as the title

importing a custom post (street) that have 2 different relationships to 2 custom posts (city,delivery-condition).

the rel' parent post titles are in hebrew and with spaces
חיפה איזור 1
חיפה איזור 2
חיפה איזור 3

U-CSV-I-PRO output the types_relationship field as the parent title - not the id

when trying to import back, the types_relationship field with posts-titles with spaces - the rel' isn't set

i must manually translate the types_relationship field outputted as titles into the corresponding post id
when importing types_relationship with post id everything works fine
when importing types_relationship with titles without spaces (in hebrew char) - works fine

so it is an issue to:
export custom post with relationship using "ultimate csv importer pro" - types_relationship outputted as title with spaces

then import back - while leaving types_relationship field as is (חיפה איזור 1)

result - rel' with spaces in titles are not set

#1890363

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Have you checked how you can prepare the CSV and import it with post relationship:
=> hidden link

If yes and you find it its not working as expected:
Can you please contact the Ultimate CSV Importer pro support as that is a third party plugin and all the control of import process is on the Ultimate CSV Importer Pro author.

Would you mind to contact them and if they will find any bugs, they will contact us on your behalf or even you can update us here.

#1890613

the question is :

is it a bug?

is there any problem with importing a types_relationship field with post title as the "identifier" (instead of post_id)?
when its one word its working (like ״חיפה״).
when there is spaces in the parent post title (like ״חיפה אזור 1״) then the import process doesn't set the relationship.

is "outputting a post title" by toolset design?
does spaces with non-latin char as parent post "identifier"

is there a toolset tool to export 1 example of the cpt then import 3000 custom post items with relationship many to one?

#1890619

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

is it a bug?
==> I do not confirm as this needs to be check with CSV importer Pro plugin.

is there any problem with importing a types_relationship field with post title as the "identifier" (instead of post_id)?
==>
I do not see any report yet and did not test this yet but here is the official doc where we display how the CSV file should look like:
- https://toolset.com/course-lesson/how-to-import-posts-from-csv-files-and-maintain-relationships-when-using-the-csv-importer-plugin/

when its one word its working (like ״חיפה״).
when there is spaces in the parent post title (like ״חיפה אזור 1״) then the import process doesn't set the relationship.
==>
As you confirm that it works when it's a one work and its broken when there is a space in the title, could you pass all this information to CSV importer pro support please as they are taking care of the CSV input content.

is "outputting a post title" by toolset design?
==>
Please check the official Doc I shared to know what is the expected CSV should look like:
- https://toolset.com/course-lesson/how-to-import-posts-from-csv-files-and-maintain-relationships-when-using-the-csv-importer-plugin/

does spaces with non-latin char as parent post "identifier"
==>
It should work, you should try to create test post with non-latin chars manually from admin and try to connect it, if that works the CSV import should also work.

is there a toolset tool to export 1 example of the cpt then import 3000 custom post items with relationship many to one?
==>
No, there is no such Tool available.

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