Skip Navigation

[Resolved] Child records are not displayed when parents are filtered

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

Last updated by Martin Sauter 4 years ago.

Assisted by: Waqar.

Author
Posts
#1904457

I have 2 custom post types which are connected through a 1-to-many relationship: WINES and AWARDS (1 wine can have 0 … n awards).

I try to create a page that lists all awards, grouped by wine. This looks like this:

Wine A 2018
– Award 1
– Award 2
– Award 3
Wine A 2019
– Award 4
Wine B 2018
Wine C 2018
– Award 5
– Award 6

To achieve this I have set up 2 views: the first one displays the wines, the second one (which is embedded in the first one) displays the awards of a wine.

So far, so good. This works fine as long as this list is NOT filtered. But as soon as I filter the list by the wine name (e.g. Wine A), only the wines are displayed, but not their awards:

Wine A 2018
Wine A 2019

Somehow this makes no sense for me. What am I missing?

#1904713

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see exactly how these 2 views are set up in the admin area.

Can you please share temporary admin login details along with a link to a page where these views can be seen?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1909323

Hi Martin,

Thank you for sharing the admin access, but, I'm getting the "Unknown username" message.

Can you please check the username and the password again?

I've set your next reply as private.

regards,
Waqar

#1910243

Thank you for enabling the admin access.

I noticed that in the nested view "Awards – Awards of a Product", the code for the search filtering field from the parent view "Awards – Products" is repeated in the "Search and Pagination" section.

That code should only exist in the parent view, so you'll need to remove it from the child view's "Search and Pagination" section and only keep:


[wpv-filter-start hide="false"]
[wpv-filter-controls]
[/wpv-filter-controls]
[wpv-filter-end]

#1910251

Thank you Waqar – you made my day!