Skip Navigation

[Resolved] Filter not working right

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 12 replies, has 2 voices.

Last updated by Pete 1 month, 3 weeks ago.

Assigned support staff: Christian Cox.

Author
Posts
#2065479
A3 Template.jpg
A2 Custom Fields.png
A1 View.png

Hi there,

We've hit a snag. We're working on a rebuild, from Elementor to Kadence...all going great.

To explain what we've done.

We have a View, this works great on our older sites and we're happy with it. It uses URL params so we can use one View on many pages.
See A1 View

We've then used Toolset to create Custom Fields. See A2 Custom Fields.

We've then created a template using blocks. This template is used on many, many pages. See A3 Template.

Then on specific pages we use the shortcodes with wpv-area...again all works exactly as we wanted. Shortcodes for London are:
[wpv-form-view name="destination-pages-main" wpv-area="london" target_id="self"]
[wpv-view name="destination-pages-main" wpv-area="london" view_display="layout"]

See page result: hidden link

The issue, London only has 2 properties for now, when you select the Guests drop down all options are there when in fact there should only be a limited amount of options.

It is as if Search & Pagination aren't talking to the Loop Editor initially, if you hit 'RESET' it then clears and works fine.
Or, if you select 20, you have no options and when you select again...it is correct.

On our old, live site this works fine using the painfully slow Elementor...hidden link

I have gone through everything for hours and cannot work out why this isn't working right.
We have to have a template as we are expanding the area pages from 20, to 40 so a master template and shortcodes is really important.

Any thoughts would be great.

#2065833

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi, I'll be glad to help sort this out. If I understand correctly, the main issue right now is that the options for the filters "No of guests" and "Collection" are incorrect upon page load. Several options appear that should not be present given the custom search feature "Only show available options for each input".

Let's try a few troubleshooting steps to try to isolate the issue and see where things are failing and where things are working.
- If there are any server-side caching systems in place, please be sure to clear those caches.
- Ensure your Toolset plugins are all up-to-date by going to wp-admin > Plugins > Add New, and clicking the Commercial tab. Scroll down to the Toolset installer and click "Check for updates". Update plugins as needed.
- Temporarily deactivate all custom code snippets in Toolset > Settings > Custom code, deactivate any custom JavaScript applied to this View, deactivate all plugins except Types, Blocks (or Views if you use the legacy plugin), and Maps
- Temporarily activate a default theme like Twenty Twenty One
- Create a new test Page and drop this View on the page using a single shortcode instead of split shortcodes:

[wpv-view name="destination-pages-main" wpv-area="london"]

- Check the filter options when the page loads.
- If the options are correct with a single shortcode, replace the single shortcode with the two separate split shortcodes and test again.
- In either case - one or two shortcodes - if the options are incorrect, reactivate snippets, plugins and your theme one by one, testing each time you activate a component, until the problem returns. Try to pin down one specific component responsible for the conflict.
- If the options are incorrect in both cases - single shortcode and two split shortcodes - temporarily switch the Query Filter settings for wpv-area to select London as a predefined static filter instead of responding to a shortcode argument. Repeat the tests with one and two shortcodes.

Please let me know what you find out and we can go from there.

#2066103
aa plz see.jpg

Hi there Christian,

Thank you for getting back to me. Ok I was just about to start working though your list,
I had never seen this option you mentioned: "Only show available options for each input".

Having never set this on any site, all worked perfectly, I Googled it and found mention of it on another Toolset ticket from someone else having the very same issue:
https://toolset.com/forums/topic/filters-showing-all-options-instead-of-relevant-options/

So, thinking this issue was new to me on a rebuild I went to an exsisting live site of ours, exactly the same views, because its a clone, the setup exactly the same. The filters were working as they should.

I noticed Toolset was not up to date, so I updated. Hey presto the filters there are now not right.
It seems clear that an update is breaking something (see attachments).

I have rolled the live site back.

Now I thought the rebuild site worked fine initially, and only noticed the broken filters yesterday...I remember updating Toolset mid last week.

An update seems to be the issue?

#2066683

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

available-options-blocks.png
screen-options.png
available-options.png

Thank you for getting back to me. Ok I was just about to start working though your list, I had never seen this option you mentioned: "Only show available options for each input".
It turns out the text is actually "Show only available options for each input" in the legacy editor, but you understood my point. In the Block Editor, you can find this option in the sidebar Custom Search panel when the top-level View block is selected. The text there is "Show only filter options that would produce results" - screenshots attached here.

The corresponding configuration option is not always obvious in the legacy editor because it is buried in the individually managed options. To expose and adjust it, you must first activate the Custom Search Settings configurations section in the View editor, if it is not already active and visible. Scroll to the top right corner of the View editor screen and click to open the "Screen Options" tab, where you can activate Custom Search Settings (screenshots are attached here). In the Custom Search Settings, you must choose the option "Let me choose individual settings manually," then some additional settings will appear. The section "Which options to display in the form inputs" should be down at the bottom of that area.

Be sure the "available options for each input" option is selected here and save the changes if necessary. If that does not produce the results you expect on the front-end, I can take a closer look. Please provide login credentials in the private reply fields here. I will log in and make a clone of your site by installing the All-in-One Migration plugin or the Duplicator plugin. Then I will be able to install a copy of your site in my local test environment, update to the latest plugins there, and confirm the problem is replicable. Once I've confirmed that I can escalate to my 2nd tier support team for further investigation.

#2066747

Hi Christian,

I posted on Toolset Facebook page earlier today and this is happening to many others all of a sudden.

Surly it seems pointless to start playing with settings to change things when clearly, not only for myself, but others also that a recent update is causing this issue. I further clarified this on the live site where I demonstrated this with the image I attached in the last reply.

Surly this needs reporting rather than spending any more time on this?

Thank you.

#2066997

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Yes it definitely needs to be reported to my 2nd tier team and it has not been reported as of right now. As I said I'm happy to log in and make a clone of your site to report the problem. A replicable instance of a problem occurring in a site is one of my requirements for reporting an issue to the developers, reports simply based on screenshots are rejected. Sorry for the inconvenience but that's the process I must follow. Private fields are enabled again here so you can include login credentials.

#2067193

Hi there Christian,

I wont be granting access to clone my site, this I do not wish you to do just to prove an issue to Toolset. Pretty outrageous to be honest.

A few of us on Facebook clearly not happy and tagged Dario, the issue does exist and there are now a few tickets open ref this in Support. I will not be granting access, that's final really!

#2067229

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Very well, thank you for the update. I'll report here as soon as I have more information to share.

#2067413

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I've been approved to escalate this ticket directly to our developers, who are now urgently investigating the filter options issues reported by you and other users. I see you have commented in another similar thread here:
https://toolset.com/forums/topic/filters-showing-all-options-instead-of-relevant-options/

That issue seems to have similar symptoms. The search filters in that case are in a WordPress Archive, but your report mentions the problem in Views. I also noted you would rather not adjust the Custom Search settings or provide site access / site clone. I spent a couple of hours trying to replicate the problem in a test site with configurations based on the information you have provided so far, but I have been unsuccessful as yet. I am passing all the information I have now over to the developers and I will continue to keep you updated here as I receive additional information.

#2067459

Thanks for the update Christian.

There are 5 others with the very same issue and I guess we all use Toolset differently.

Worth a mention, the sites we have where all ok has:
Blocks 1.4.1
Types 3.4.7

The site with updates and broken filters have:
Blocks 1.5.2
Types 3.4.10

Somewhere in those updates has changed something for sure. A minefield I wouldn't even wish to think about but then I'm no developer.

#2068023

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

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.

#2125231

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

The latest versions of Toolset plugins now have the permanent solution for this problem included automatically. After updating, the patch file is no longer required.

#2125255

Thank you.