Skip Navigation

[Resolved] Entering the _wpcf_belongs_[parent-slug]_id no longer connects the post types

This thread is resolved. Here is a description of the problem and solution.

This support ticket is created 6 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by Jim 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1100587

Jim

We use an import tool to import articles into our website.
Before I entered the parent id in the _wpcf_belongs_[parent-slug]_id field and that correctly connect the article to the parent journal.

But now this no longer works. Did something change lately?

I did a suggested toolset migration of the relationship. (I thought that was neccesary/an update from the plugin)

Does that have something to do with this problem?

#1100689

Hi, yes the new relationship system has a more robust method of establishing connections between posts. The _wpcf_belongs..._id custom field value is no longer recommended. Once you have migrated post relationships, you should begin using the new Post Relationships API toolset_connect_posts to programmatically link posts:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

If you do not want to take advantage of the new post relationship features like repeating field groups, etc., relationship migration is not necessarily required. You can revert to a previous version of your site before migration, and the _wpcf_belongs..._id syntax will continue to work.

#1100817

Jim

Thnx for your reply Christian,

well that kinda s*cks... 😉

Is there any other way to connect the articles to it's parent (on import)?
Because I could roll back but will loose a lot of other changes made since the migration...

#1101612
#1104306

Jim

Well, I use WP All Import, a differt tool, to import articles because it is quite a complex import.
Before I could simply enter the id of the parent post type into the appropiate field and be done.

The ultimate csv importer is just another tool but does not offer the option to set the parent id (as far as I could see).

Your other solution uses the toolset csv import I think.

I see there you use the parent title (instead of the parent_it?).

Is it possible to connect the imported child post to his parent with the [parent title] ?

Is there a meta field where I can enter this to establish the connection?

#1104669

The ultimate csv importer is just another tool but does not offer the option to set the parent id (as far as I could see).
It doesn't offer an option to automatically set the parent ID in the CSV file for you, but you can add a couple of columns to the generated CSV file and set the related post titles or ids yourself. https://toolset.com/documentation/user-guides/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/

I see there you use the parent title (instead of the parent_it?).
The document states that you can use the post GUID instead of the post title in case there are duplicate titles: https://toolset.com/documentation/user-guides/importing-content-from-csv-with-post-relationships/#how-toolset-associations-can-be-added-to-a-csv

Is it possible to connect the imported child post to his parent with the [parent title] ?
I'm not sure I understand the question. The document linked above describes the process of connecting previously imported child posts and previously imported parent posts by importing a CSV file containing information about those associations. It is possible to use the post titles or the post GUIDs as post references. Am I misunderstanding your question?

Is there a meta field where I can enter this to establish the connection?
This section describes how you can structure a CSV file to include a meta value that is then used during the import process to automatically link those posts in the new relationship system: https://toolset.com/documentation/user-guides/importing-content-from-csv-with-post-relationships/#an-example-of-how-a-csv-would-look-like
So you will generate some CSV file with the correct information, then import that CSV in the Toolset Import Association interface.

#1105567

A quick update - our documentation team posted this information about using the new beta version of WP All Import to import post relationships and let me know about the new feature:
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/how-to-import-data-from-a-csv-file-using-the-wp-all-import-toolset-types-add-on-plugin/post-relationships/

I haven't been trained on this feature yet but wanted to let you know it may be possible now.

#1112261

Jim

Yes!
Thanks Christian. Sorry I did not respond any sooner.

Just tested it and I can confirm that it's working 🙂