Forums › Forums › Search & Filter Pro › Products disappearing from Filters
- This topic has 27 replies, 3 voices, and was last updated 4 years, 1 month ago by Ross.
-
Anonymous(Private) October 7, 2020 at 1:34 pm #262204
Hi, I have an issue whereby some of my products keep disappearing from the search & filter options.
I am using 2 x Taxonomy searches and a post meta custom field in my filter.
The issue is that the first Taxonomy option is occasionally missing some of the items and I keep having to go back in to the filter and rebuild the cache in order for them to reappear.
Sometimes, just making a change and changing it back again, which causes the filter to ‘fetch the cache’ without rebuilding the cache can fix the issue.
We are also using Elementor Pro and have the additional Elementor plugin for this.
What could possibly be causing this?
PS: This was happening for some many weeks now and then and we didn’t have any caching plugins installed when it started happening.
Kind regards
Zoe
Trevor(Private) October 8, 2020 at 11:59 am #262409You are using WP All Import Pro. When you use that, it does not inform WordPress (and consequently our plugin) that a post has been changed/created/deleted.
You need an additional function added to the child theme functions.php file:
add_action('pmxi_saved_post', 'wp_all_import_post_saved', 1000, 1); function wp_all_import_post_saved($id) { do_action('search_filter_update_post_cache', $id); }
This is so our cache rebuilds (just for the affected post) after each post is imported. This is the equivalent of editing a post manually and clicking the ‘Update’ button, but much faster.
Trevor(Private) October 15, 2020 at 5:10 pm #263030If ‘Update’ is being pressed in the product editor page, our cache should be updated. The only time that might not appear to work is if your server caches database writes to do ‘later’. What then would happen is you would press ‘Update’, and our plugin would immediately update the cache for that product, but at this point find no changes, and then your server might update the database, but our plugin would not know this has happened. Then, if you hit update again, having made no changes, and our plugin would rebuild that product’s cache again, this time finding the changes, from the previous delayed save.
We have seen this type of issue before, but server configuration is not our field of expertise, so we can only think something like this is happening.
-
AuthorPosts