Skip Navigation

[Resolved] Filters showing all options instead of relevant options

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

Problem:

The setting to “Show only filter options that would produce results” in a View with custom search can result in expensive queries on larger sites with several filters, and the last update of Views/Blocks included efforts to optimise these to make them maximally efficient.

It seems that in some cases this has led to the setting not working at all, in particlar on the initial page load rather than when changes to filters are applied, such that filter options include options that would lead to no results.

Solution:

This is fixed in next version of Toolset Views/Blocks plugins, currently you can try the patch file of below erratum:

https://toolset.com/errata/view-setting-show-only-filter-options-that-would-produce-results-not-working-correctly/

Relevant Documentation:

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

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/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 4 voices.

Last updated by scottL-3 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2063413

I am trying to:
Use several filters on an archive page using Types, Blocks and WooCommerce Blocks but with classic Views, not block built Views as this site has been around longer than Blocks and has complicated archives, views and content templates that aren't easy to move to Blocks.

Link to a page where the issue can be seen:
hidden link

I expected to see:
On this and any product taxonomy related archive we used to only see checkboxes for options that will produce results.

Instead, I got:
With the most recent updates ( Types 3.4.10, Blocks 1.5.2, WooCommerce Blocks 3.1 ) we are now seeing all filter options, not just those for which products in the current archive have values.

#2063799
limit-options.JPG

Hello,

I assume we are talking about a taxonomy archive page, and you are going to design the WordPress Archive page with classic editor.

If it is, please check these:
1) Dashboard-> Toolset-> WordPress Archive,
Setup one WordPress Archive for the taxonomy "product-category" with custom search form.

2) In above Toolset WordPress Archive, section "Custom Search Settings", enable option:
Let me choose individual settings manually-> Show only available options for each input

See my screenshot limit-options.JPG

#2064249
Screen Shot 2021-05-21 at 9.52.22 AM.png

This is a site that has been working for years. It has many archives and views on it with filters. If the settings are different now, why are the defaults different than they have been in the past?

That means I need to go make changes to hundreds of filters on dozens of sites to get them all back to working the way they have for many years now.

More importantly, I set the setting to hide the options that won't produce results and they are still showing. I cleared cache and tested from more than one browser.

Go here: hidden link
Check 12 MIL Residential
No results

Attached image shows this archive's search settings.

#2066015

he problem you mentioned above is abnormal, please try these:

1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP code snippets, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2066113
aa plz see.jpg

Hey Scott,

We've noticed the same issue, only Googled this morning and found it was a recent issue and your ticket.

Fortunately we are rebuilding a site and I thought we'd broken something, so still had live sites on exactly the same setup. Filers fine on those until I updated Toolset...this broke the filters.

I spent 5 hours yesterday looking for the issue our end...seems to be an update issue? Waiting to hear back from support ref this 🙂

#2067261

Thanks for the details, please provide a little more details:
In which version Toolset plugins, you can get the expected results:

On this and any product taxonomy related archive we used to only see checkboxes for options that will produce results.

I need to duplicate the same problem and compare them in my localhost

#2067271

Nigel
Supporter

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

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

@pete could you please open a new thread. It would be helpful to get a copy of your site for testing, and you'll need to open a new thread so that we can get credentials from you.

#2067299

I can duplicate the same problem, and have escalated this issue, will update here if there is any news.

#2068451

Update:
Our developers have created a patch file for Blocks 1.5.2 / Views 3.5.2 You can find this patch file along with instructions for its implementation in the erratum here:
https://toolset.com/errata/view-setting-show-only-filter-options-that-would-produce-results-not-working-correctly/

Update to the latest versions of all other active Toolset plugins first, then apply the patch to the updated Blocks plugin file. Let us know if the issue is not resolved completely after the modification.

#2068469

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.