Forums › Forums › Search & Filter Pro › Why do I have to click the Cache button to make Search work?
- This topic has 8 replies, 2 voices, and was last updated 8 years, 6 months ago by Trevor.
-
Anonymous(Private) May 17, 2016 at 11:18 pm #45811
Hello!
Something strange is happening to the Search and Filter function on my site, http://www.ymphony.com. At the top, notice the filter and search functionality. When I create a post, the dropdown boxes does not offer the appropriate selection items. For some reason, each of the dropdowns does not grab any of the selection items.
So, I would go to the Setting and Defaults page, and notice the “Rebuild Cache” button…and I click this button. Then, I would go back to the homepage and now the dropdowns have the selection items from the new post.
Can somebody provide why I need to click on the “Rebuild Cache” in order for the dropdowns to include the appropriate selection items? Can you provide guidance on not needing to click on the “Rebuild Cache” button? Thank you!
Trevor(Private) May 18, 2016 at 10:39 am #45848What this means is either your server or the theme is blocking automatic re-building of the cache.
http://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/
This page shows the filter that needs to be run after you save/create/update posts, which would have to be manually added to your site.
Anonymous(Private) May 18, 2016 at 11:42 am #45866Hi Trevor.
So, I’m not understanding fully so please excuse me….
When a user submits a post, the expectation should be that the filter dropdown fields on the Search and Filter functionality should include dropdown selection items from the submitted post automatically.
In the below reference, I don’t understand the fact that I have to add the post number (for example, “23”) into the do_action code below. There could be 100 posts submitted by various users. Does that mean I have to create 100 do_action functions and add each individual post IDs into them? (Most likely not, but I’m just asking).
Thanks,
Moses
“Usage
do_action(‘search_filter_update_post_cache’, 23);
Takes 1 parameters – Post IDThis allows you to manually update the cache for a particular post – replace 23 with the ID of your post.”
Anonymous(Private) May 18, 2016 at 11:42 am #45867Hi Trevor.
So, I’m not understanding fully so please excuse me….
When a user submits a post, the expectation should be that the filter dropdown fields on the Search and Filter functionality should include dropdown selection items from the submitted post automatically.
In the below reference, I don’t understand the fact that I have to add the post number (for example, “23”) into the do_action code below. There could be 100 posts submitted by various users. Does that mean I have to create 100 do_action functions and add each individual post IDs into them? (Most likely not, but I’m just asking).
Thanks.
—
“Usage
do_action(‘search_filter_update_post_cache’, 23);
Takes 1 parameters – Post IDThis allows you to manually update the cache for a particular post – replace 23 with the ID of your post.”
Trevor(Private) May 18, 2016 at 2:11 pm #45879When a user submits a post, the expectation should be that the filter dropdown fields on the Search and Filter functionality should include dropdown selection items from the submitted post automatically.
Yes, unless your theme blocks this, which it appears to be doing.
The code you actually use would assume that the submit function that the user triggers by saving a post will return the ID, which you capture into a variable and instead you put the variable name into that part.
Read some of the posts in this search:
https://support.searchandfilter.com/forums/search/search_filter_update_post_cache/
Anonymous(Private) May 24, 2016 at 3:10 am #46438Hi @Trevor,
What is strange is that this situation did not occur before. I didn’t need to click on the Cache button for the Search and Filter plugin to work.
For some reason, it seemed as though it stopped working and now I need to click the cache button. Any thoughts? Thanks.
-
AuthorPosts