Skip Navigation

[Resolved] Filter don’t works

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

Problem:
Checkboxes field filter is not working as expected.

Solution:
It seems that at some point the setting to save 0 for non selected option was activated. Check this screenshot http://prntscr.com/11c2nac

Toolset stores the values of a checkboxes field inside a serialized array and perform the search using the "LIKE" operator. When an option is saved with 0, it matches the LIKE operator. This gives unexpected results.

The setting is configured to save nothing when an option is not selected. You will have to manually update the erroneous posts on a search to save the correct values on the database.

This support ticket is created 3 years, 8 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: Africa/Casablanca (GMT+01:00)

This topic contains 12 replies, has 2 voices.

Last updated by stephaneB-5 3 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#2016263
Capture d’écran 2021-04-09 à 17.54.00.png
Capture d’écran 2021-04-09 à 17.53.49.png

Hello,

I am on a website development and I encounter a problem.
I have created sorting filters on a page for a certain product category with custom fields but on a filter it does not work.

page url : hidden link

Can you help me?

I attach the capture of the custom field declaration and the capture of the filter.

Thanks in advance,

PS: is it possible to put range slider in the filters of sorting toolset?

#2016335

Hello and thank you for contacting the Toolset support.

I tested the page a bit and it seems to work for some filters. Check this screenshot hidden link
This means that some of the filters do not have the corresponding query filters. Try to remove the filters and the query filters from the view and start again by adding the filter. This should generate the corresponding query filters.

If you still find issues, I would like to take a closer look at your website. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please provide a test scenario to demonstrate the issue.
1. I do xxx
2. I do xxx
3. I expect to have xxx
4. Instead, I get xxx

Regarding the range slider, that's not a built-in feature. But, I think that you can achieve that using some Javascript code or a 3rd party library. Check this links:
- hidden link
- hidden link
- hidden link

#2018079

Thank you for your answer.
Can you give me an email in order to create you an acces to the website and do you need a ftp acces ?

regards,

#2018121

Please use this email address jamal.b+2016263@onthegosystems.com.

Please provide a detailed example that will demonstrate the filters' issues:
1. I do xxx
2. I do xxx
3. I expect to have xxx
4. Instead, I get xxx

#2018607

Thank you! I can see the issue using 28cm in the filter, not all the results have the option 28 selected.

The view seems set up correctly. I could not find the cause of the issue at this point. So, I'll need to take a copy of your website and debug it further locally. Let me know if you allow me to take the copy?
If yes, I'll install Duplicator or WP All In One Migration plugins to take the copy.

#2019301

You can duplicate website.
And on my side, I continue to develop other feature on the website.

Thank you

#2019307

How deactivate debug information please

#2019315

I took a copy of your website and I'll start debugging it locally. I'll get back to you as soon as possible.

In the meantime, can you explain your last question better? I am not sure to understand what do you mean? How deactivate debug information please

#2019317

Hi ,
You can dupicate website but in my website how desactivate debug informatio ?

#2019321

A debugging window opens on some pages and it prevents me from editing beaver builder properly
How to disable it ?

#2019337

I see now. That's the view debugging window. I deactivated it in Toolset->Settings->Frontend Content. Check this screenshot hidden link
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#the-views-debug-tool

#2019579

It seems that at some point the setting to save 0 for non selected option was activated. Check this screenshot hidden link

Toolset stores the values of a checkboxes field inside a serialized array and perform the search using the "LIKE" operator. When an option is saved with 0, it matches the LIKE operator. This gives unexpected results.

The setting is configured to save nothing when an option is not selected. You will have to manually update the erroneous posts on a search to save the correct values on the database.

For example, if you just save the product "ECOMAX 40H C2" from the backend without changing anything, will ensure that it will not appear when searching using 28cm "largeur-travail".
hidden link

I hope this helps. Let me know if you have any questions.

#2021873

Thank you for the help !
It's working now