Passer la navigation

[Résolu] One-to-Many CPT Relationships?

This support ticket is created Il y a 3 years, 10 months. 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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par monicaI Il y a 3 years, 10 months.

Assisté par: Minesh.

Auteur
Publications
#2432217

Tell us what you are trying to do?
I developed my Toolset site in May of 2017 and I'm wondering if enough has changed since that version to warrant an overhaul. I have this relationship, and it required a lot of customizations.

Trail -> Report -> Visit <- User

In other words, Trails have Reports (they are dated visits to that trail), and Reports have Visits (the people who were on the trail that day). Users have Visits, because each visit is associated with a person. As an example, we may have gone to the SuperCool Trail, and the Report on August 4th, 2022 has a list of people who were there (Visits). Each WordPress User is associated with those Visits, too. So, a Visit has 2 parents.

Toolset helped with a lot, but it struggled with this relationship back in 2017. Is this something it does out of the box, now? How challenging do you think it will be to migrate this content to the current methods? I haven't changed much of the code since 2017.

Is there any documentation that you are following?
Toolset user guides from 2017.

Is there a similar example that we can see?
lien caché is a recent report. The people listed at the top are actually Visits. They maintain their avatar and information about themselves in processes completely separate from WP Users. There are fields in Visits and Users that tie them together.

What is the link to your site?
lien caché

#2433753

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm not sure what problem you had before with legacy post type relationship.

The new many-to-many post relationship added with Types 3.x.x with the aim of improving performance and how Toolset stores post relationship content internally. With new post relationship Toolset uses its own custom tables to store the related content.

Here are those few articles:
- https://toolset.com/2018/05/toolset-post-relationships-release/
- https://toolset.com/2018/05/when-if-to-migrate-relationships-in-old-toolset-sites/

Even if you want to migrate you should not take that steps on production site, the first step you should follow is take full backup of your production site (database+files) and then create a staging site and on staging site you should perform and check how new relationship migration works.

#2433993

Thank you! That was the information I needed.