Skip Navigation

[Resolved] Filtering results

This support ticket is created 4 years, 5 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
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 19 replies, has 2 voices.

Last updated by Christian Cox 4 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1895145

Hi Christian,
I've recorded a video so maybe it will be more clear:
hidden link

On the first part of the video, as you might see, if I'm going to select an option in the select, it will populate the second field with a certain value (always 'Novadens'), no matter what, and the third value, too.
Than, there seems to be issue in changing the select value.
You should be able to replicate it.

In the second part of the video, you may see that the filter works as it is supposed. It gets the first select value, and then filter the second based on the first and so on.

Let me know you you understand or I need to make something to be more clear.

#1896473

Okay understood, thank you for the additional information. I will run some tests on the broken version to see what might be the problem. I will be deactivating the custom theme and other plugins temporarily to try to narrow down the source of the problem, so you may see the site behaving strangely temporarily. I'll update you shortly with some more feedback.

#1896581

Okay I think I see the problem. To fix the problem, I edited the View here:
hidden link

I added an empty default option default_label to each of these custom field filters in the Ricerca e impaginazione editor panel:

...
[wpv-control-postmeta field="wpcf-prodotti-ai-quali-il-documento-si-riferisce" type="select" url_param="wpv-wpcf-prodotti-ai-quali-il-documento-si-riferisce" default_label=" "]
...
[wpv-control-postmeta field="wpcf-potenze-alle-quali-il-documento-si-riferisce" type="select" url_param="wpv-wpcf-potenze-alle-quali-il-documento-si-riferisce" default_label=" "]

When no default_label is provided, one of the filter options was automatically selected, but that option produced no results. This was causing problems because of the "Mostra solo le opzioni disponibili per ogni input" feature, which removes filter options based on other selected options. Instead, it's best to provide an empty default option.

I've made this change for you, and the filters seem to be performing better now. Can you take a look and let me know if the behavior is more like you would expect?

#1898725

I Christian,

I've seen your changes and now from the first test it seems to be working just fine!
Thx a lot for your assistance.
I'll conduct some latest check and I'll close the ticket.
Very professional and kind: thx for all the help provided. Very great assistance.

#1900131

That is excellent news! I will stand by for your update. Hopefully we have found the main problem and implemented a practical solution.