Skip Navigation

[Resolved] View filtering no longer based on current category

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 9 replies, has 3 voices.

Last updated by Waqar 1 year, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2650211

This used to work perfectly, but I just did a final test before going live tomorrow.
hidden link

The Countries (Land) and Regions (Regio) taxonomies in the select boxes, should only be showing the relevant choices. Now they show all countries and all regions.

I have no idea what I could have done to break this. Like I said, last time I checked, the select boxes were ok 🙁

But when you edit the Price range filter or click the Filter Reset button ("filters verwijderen"), after the AJAX call, the select boxes are ok. The Category View ID is 3484.

#2650307

Hi,

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

When I checked the search form options and the results, they were updating as per the selection through AJAX.

Have you made any changes after writing to us and can you please test this again?

In case the issue still persists, you're welcome to share temporary admin login details, along with the exact steps to see the issue.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2650319

It might be AJAX related, because Minesh built us an excellent Upsell/Related Products View, and that also no longer works. It should only show Products within that same category, but it now shows all products

https://toolset.com/forums/topic/split-custom-view-to-display-upsell-related-products-display-upsell-and-related-product-when-upcell-is-product-is-less-than-eight/

hidden link should have no upsell and no related products.

#2650387

UPDATE: I am moving all Elementor Templates, Toolset Views, CSS, ... to the live site and hidden link does show the correct dropdowns for Country and Region. So bizarre.

Could that be due to (object) caching on the dev site? If so, how to fix this, because we will soon transfer the live site from one.com to our Vultr server at GridPane, so the live site will move to the server environment of the current staging/dev site.

#2650453

Thank you for sharing these updates.

However, my observation is different than yours.

When I use the search fields for 'Country' and 'Region' fields ( on page hidden link ), the options and the results are updated through AJAX correctly.
( I have tested this both as a guest and as a logged-in user )

Is it possible that you are having this cache/AJAX issue on only any particular device or browser? Can you please test this after clearing all involved caches?

#2650455
Screenshot_8.jpg

When you visit that Whisky category, what do you see in the dropdown?
Just like the screenshot, because that displays the issue. Barbados for example does not belong there, no products in the category whisky have a taxonomy Country of Barbados.

#2650641

Thank you for sharing the screenshot and I understand what you mean now.

I thought your report was that the search options and the results were not updating through AJAX. I see now that the option(s) which don't produce results are showing.

Yesterday, when I checked the search settings, it was correctly set to show only those options that could produce results. But today I can't access the website admin area, because the access link seems to be expired.

Can you please share the temporary admin login details and not the admin access link? I'll also need your permission to download a clone/snapshot of the website, to investigate this on a different server, if needed.

I'm setting your next reply as private.

#2651409

Thank you for extending the access link.

I've downloaded the clone of the dev website and will be performing some tests to see why the option to show only the relevant results doesn't work when the page loads.

Thank you for your patience.

#2651825

Nigel
Supporter

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

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

Hi there

Waqar is off, so I wanted to take a look at this for you.

Reading through the thread, it seems like the reported issue happens on the dev site, but not on production, and you want to establish why the problem exists on the development server.

I can access the back end of your production server via the access link you shared, but when I try and visit any page on the dev server it gives a 500 error (i.e. there is a fatal PHP error for any page visit).

Can you resolve the problem on the dev server (you may need to check the debug.log to see what fatal error is affecting the site), and then I can take a look.

#2653235

Thank you for waiting as I completed some testing on your development website's clone.

While I was able to experience the same issue on your website's clone on my test server (even without the object cache). I was not able to reproduce this on a clean install.

For this reason, it will need to be treated as an exception, especially because the same is also not being experienced on the production website.

If the following script is included in the 'Products Filter' view's "JS editor", it forces the 'change' event to the land taxonomy's select field, when the page loading completes:


jQuery(document).ready(function() {
    jQuery('select[name="wpv-land"]').trigger('change');
});

This 'change' makes the search form update and shows only the relevant options. Feel free to try this script on your development website and let me know how it goes.

#2653959

Hi,
My dev site is no longer active so I won't be able to test this, but I will keep this script in mind.