Skip Navigation

[Resolved] Records for relationship not showing to be selected [Backed]

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

Problem: I have a one-to-one post relationship set up between two different post types. When I try to select one of the posts for this relationship, it is not found. No results are found in the autosuggest field.

Solution: Since it's a one-to-one relationship, you can only choose a post once here. It is not possible to select the same post related to more than one other post in a one-to-one relationship. For that, you will need a one-to-many or more likely a many-to-many relationship.

This support ticket is created 4 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
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 2 replies, has 2 voices.

Last updated by jacoboG-2 4 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1595385
1.png
Anotación 2020-04-22 102500.png

Hi!

I've created 3 CPT:
- Aggregate Product ("Producto Comparador" in the images)
- Shop product ("Producto Tienda" in the images)
- Shop ("Tienda" in the images)

I've set relationships like:
[1..N] Aggregate Product <-> Shop product
[1..1] Shop product <-> Shop

The problem I'm facing is when editing a Shop product, boxes for both relationships are showing. BUT the box for the "Shop product <-> Shop" relationship doesn't show or finds any of the Shops when I try to connect an existing one (image attached).
If I create a new Shop from there, it works ok, but of course that's not what I want.

The box for the other relationship seems to be working ok, though. I can connect/disconnect and/or create existing Aggregate products without problem.

Any idea what may be happening with the other relationship?

Thanks a lot!

#1595907

If a Shop is selected already in another 1-1 relationship, you will not be able to select it again in this 1-1 relationship. My guess is this is what is happening here. You want to associate the same Shop to another Shop product, but that is not possible in a 1-1 relationship. You'll probably need a many-to-many relationship for that.

#1596085

Aggg... You're totally right. I don't know how I missed that, sorry.

Thanks a ton for the help!