Skip Navigation

[Resuelto] Views + relationships not working everytime

This support ticket is created hace 1 año, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 4 respuestas, tiene 3 mensajes.

Última actualización por Waqar hace 1 año, 2 meses.

Asistido por: Waqar.

Autor
Mensajes
#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:
enlace oculto ( WORKING)
enlace oculto (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
enlace oculto (Lieu)
enlace oculto '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

Idiomas: Inglés (English ) Español (Español )

Zona horaria: 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.