Skip Navigation

[Resolved] Problems with parametric search

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

Problem: Some results are missing from my View when I use the custom search.

Solution: Uncheck "Don't include current page in query result" in this View's settings, and if you want to allow the user to select multiple values from a multiselect you should use the comparison "in" instead of "equals" or "equal to" in your Query Filter.

Relevant Documentation: https://toolset.com/documentation/user-guides/front-page-filters/
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

This support ticket is created 7 years, 3 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.

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

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 10 replies, has 2 voices.

Last updated by romanB-3 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#556944

Hello,

I noticed those 2 bugs on parametric search :

1- Most of my views only show results if there are more than 1 ! Can't explain why...

2- Also, in a multiselect or checkboxes filter, when I select a term, all terms that would have outputted only 1 result disappear...

Would that be a bug ? Or maybe I misconfigured something ?

Please activate private fields so I can give URL and access.

Thank you.

#557035

1- Most of my views only show results if there are more than 1 ! Can't explain why...
Please provide the URL where I can see one of these Views.

Also, in a multiselect or checkboxes filter, when I select a term, all terms that would have outputted only 1 result disappear...
Please provide the URL where I can see this View.

Private reply fields are enabled.

#557255

Hi, I made two changes for you.
1. Uncheck "Don't include current page in query result" in this View's settings. This was responsible for the problem with some clients not appearing in the results.
2. Use the comparison "in" instead of "equal to" in your Query Filter settings for the responsable projet filter.

#557261

Thank you very much, it works perfect now.

#557319

Finally I have another view that has the same problem...
I have Uncheck "Don't include current page in query result" and there is no "responsable projet" field here...
Could you please reactivate private fields so I can send you this other URL ?
Thank you.

#557327

Okay please share the login credentials.

#557387
Screen Shot 2017-08-07 at 3.03.21 PM.png
Screen Shot 2017-08-07 at 3.02.31 PM.png

The main problem I see is that your Query Filter for the "pays" taxonomy is set to respond to URL parameters, but your View does not modify URL parameters when it updates. See the attached screenshots. These two options will not work together.

#557523

I don't think that's the issue since here is another view where I have the exact same issue, and where none of the options you say are activated ; there is not "pays" field, and the URL parameter are activated...

Please replace last part of the URL with "/client/client-germain/"
In the admin it is /wp-admin/admin.php?page=views-editor&view_id=602

#557870
Screen Shot 2017-08-08 at 3.05.32 PM.png

Regarding Client Germain, I think your custom code for View 602 was causing the problem. I have added another filter to this View for you - "Select posts that are children of the Post where this View is shown", since you want to filter this View by the parent Client. I have also disabled the custom code in your theme's functions.php file:

//add_filter( 'wpv_filter_query', 'filtrer_projets_par_client', 999, 3 );

Screenshot attached. Please let me know if this View is working correctly now on the Client Germain page.

#558016

Thank you. Now I understand the each view had a different bug. It's all set now.
Thank you very much.

#558017

Issue is resolved.