Skip Navigation

[Resolved] view is filtered to a certain category, but search filter of cf shows all items

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
- 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/Karachi (GMT+05:00)

This topic contains 19 replies, has 3 voices.

Last updated by Ido Angel 4 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1719325

hey,
this view here, is filtered to show only products within a certain taxonomies:

hidden link

hidden link
(screen: the filtering section, limiting the view to one "super category" and one "brand")

I've added a search filter, dropdown style, to enable the user to pick a certain product within the initial filtering:

hidden link
(screen showing the filter of the custom field + showing the option of "Show only available options for each input" enabled)

but in the frontend, the dropdown shows ALL products and not just products in the certain "super category" and "brand":
hidden link
(screen showing the dropdown showing all products)

Any idea?

Thanks
Ido

#1720371

Hi Ido,

Thank you for contacting us and I'd be happy to assist.

In order to fully understand how the view and dropdown are set up, I'll need to see how they are set up in the admin area.

Can you please share temporary admin login details, in reply to this message?

This will help in reproducing this issue on a test website and troubleshoot accordingly.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1721935

Hey Waqar - did you do anything? It seems to be ok now!

#1721943

no - wait - doesn't work. but strangely it works if I add a THIRD view with same filters, except the two custom fields filters... check out the view with ID 21723

#1722783

Hi Ido,

Thank you for waiting and I apologize for the delay in getting back on this.

During troubleshooting and research, I noticed that a very similar issue has been reported and fixed in the past.
( ref: https://toolset.com/errata/unexpected-options-for-the-custom-field-filter-in-the-view-custom-search-settings/ )

I'm currently running some detailed tests on my website to confirm this and I'll update you as soon as this testing completes.

Note: No changes have been or will be made on your website and all testing is being done on a test website.

Thank you for your patience.

regards,
Waqar

#1726655

Hi Ido,

Thank you for waiting.

Even after testing with a couple of different servers and PHP versions, I couldn't reproduce this issue on a clean install. This suggests that something specific to your website is involved.

The "/compare-food-processors/" page on your website seems to have been moved. Can you please make sure that all plugins are updated to the latest versions and share a clone/snapshot of the website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

Please also share a link to a page where this issue can be seen. This way, I'll be able to investigate this in more depth on my own server, without affecting the actual live website.

Note: I've set your next reply as private.

regards,
Waqar

#1732839

Hi Ido,

I continued the troubleshooting and investigation over the weekend, but the issue is still not reproducible on the test website.

As requested in my previous message, would it be possible for you to share a clone/snapshot of your website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

It will be needed since the issue seems to be specific to your website's install only.

Note: I've set your next reply as private.

regards,
Waqar

#1733037

I'm unable to do so, my host doesnt seem to have sufficient resources.... any other ideas? you have admin permissions

#1734325

Hi Ido,

I tried to create a duplicator package of your website too, but it didn't work, even after excluding the "uploads" folder and with only database option enabled.

Can you please try creating a clone package using the "All-in-One WP Migration" plugin?
( ref: https://wordpress.org/plugins/all-in-one-wp-migration/ )

Tip: This plugin also allows excluding "media library" items from the package, which would reduce the size exponentially.

In case, it doesn't work, you can share a ".sql" export file of the database from a database management tool like phpMyAdmin and share the web site's files (excluding the "uploads" folder) in a zip file separately.

Note: I've set your next reply as private.

regards,
Waqar

#1736817

Hi Ido,

Thank you for sharing the export package.

After a few challenges, I've now finally managed to deploy your website's clone on my server.

I'll be performing some tests and will share my findings as soon as this testing completes, ideally by the end of the day today.

Thank you for your patience.

regards,
Waqar

#1738239

Hi Ido,

Thank you for waiting.

During troubleshooting on your website's clone, I noticed that the issue of the irrelevant options showing in the search filters gets fixed if the Elementor Pro plugin is deactivated.

I'll recommend updating WordPress, active theme and all plugins to the latest versions and clear all involved caches and then check the search filter dropdown again.

regards,
Waqar

#1738255

thx, i just did, but the issue persists with elementor pro on as you can see here:

hidden link

#1738571

Hello,

Waqar is in holiday, you will get the answer on Monday as soon as he back.

#1743121

Hi Ido,

Thank you for waiting.

Despite switching to default Twenty Twenty theme and removing all plugins other than Toolset and WooCommerce, the issue with the custom field's search dropdown persisted on your website's clone.

Since this behavior is not reproducible on a clean/new installs, I've shared this with the concerned team as an exception, for further review.

I'll keep you updated with the progress through this ticket.

regards,
Waqar

#1753147

Hi Ido,

Thank you for waiting and I've heard back from the concerned team.

That option ( "Show only available options for each input" ) requires a reasonably expensive query. In Blocks, it even comes with a warning, although we don’t have it in classic Views.
( screenshot: hidden link )

On your website, the "wp_postmeta" table is *extremely* large, at 66Mb and it is entirely expected that problems arise when filtering by custom fields and this option enabled.

Moving forward, we have two recommendations:

1. Whenever possible, use taxonomies instead of custom fields for filtering posts. Filtering posts by custom fields are in general a bad idea as it is not optimized in the way that filtering by taxonomies is. Here’s a good link explaining the problem: hidden link

2. For cases, where the post-filtering by custom field is unavoidable and the website has a large number of posts and custom fields, it is better to keep that option disabled.

regards,
Waqar