Skip Navigation

[Resolved] Views + relationships not working everytime

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.

Our next available supporter will start replying to tickets in about 1.97 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by Waqar 1 year, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2640427
2023-09-03_09-40-01.png
2023-09-03_09-36-59.png

I am trying to:

Show events in a place ( filtered by the place)

I have a Content template called 'Lieu'
This template calls 2 Views
Événements filtrés par le lieu
Événements off filtrés par le lieu

With a filter "Select posts in a Lieux Evénement relationship that are related to the Post where this View is shown."

Link to a page where the issue can be seen:
hidden link ( WORKING)
hidden link (NOT WORKING)

I expected to see:

The events

Instead, I got:

Nothing

It works sometimes... but not all the times. The relation ship is well shown in the backoffice
Screenshot for Rue d'Oran
hidden link (Lieu)
hidden link 'event)

I made a copy of the site of the site for testing purposes (I'll give accès to that one ) I you need to the original site please let me know

#2640681

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-09-04 at 15.41.50.png

Hi there

I think the problem is that in the non-working version the View which queries the related posts is ordered by a custom field (screenshot) which the target event doesn't have a value for.

I changed the View to just order by post date, and then the expected event is shown on the front end.

It is a feature of WordPress queries (which Toolset is built upon) that if you order posts by some field, only posts with values for that field will be included in the results.

#2640727

Thank you Nigel, you're a lifesaver.
I forgot, we erased that field....

Sorry, when I click on "My Issue is resolved"
The button "Submit" doesn't work

#2640729

Can you close the ticket ?

#2640907

Thanks for the update and glad that Nigel's message helped.

I'm marking this ticket as resolved and you're welcome to start a new ticket for each new question or concern.