Skip Navigation

[Resolved] View based on many to many relationship is not working.

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 1 reply, has 2 voices.

Last updated by Minesh 10 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2687537

Sir problem is that I made a view that is not working. The view intends to display related records from a relationship many to many.

Two CPTs are linked by way of many to many relationship.

First is "Listings_Heathcare". This CPT has one record saved.

Second is "Heathcare_Facilities". This CPT has 10 records saved.

In the one record of "Listings_Heathcare" two related Healthcare_Facilities have been duly added.

Following is single page for "Listings_Heathcare:

hidden link

In this page there are two similar kind of views. Both are based on same kind of many to many relationships. First view is working.

Second view is based on many to many relationship of above mentioned two CPTs.

And this view is not displaying anything. In frontend it is just blank. Please guide what to do?

#2687628

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please check now:
- hidden link

The view you created must have been corrupted somehow as when I checked the view there is no loop output configured.

I've added another view block namely "show-related-hc-facilities" to your content template and configured its loop output and I can see its working with above page as expected and it does display the related many-to-many post:
- hidden link

#2687950

Thank you. Your "view corrupt" point may be true. Previously I made view without relationship and that view was working. Then I deleted that view and made new view based on incorrect relationship one to many. Then I deleted that also and made new relationship many to many and new view but this view was not working. Some point from above might have caused the corruption. Thanks anyways.