Forums › Forums › Search & Filter Pro › Custom post type not displayed after upgrade from 1.4.2 to 2.0.2
Tagged: 2.0, cache, custom post type, not displayed
- This topic has 12 replies, 3 voices, and was last updated 9 years, 1 month ago by Anonymous.
-
Anonymous(Private) October 23, 2015 at 8:47 pm #28123
hello,
today i updated to 2.0.2 and several problems occured
1.:
i use search and filter for 3 different custom post types (ac-dc, dc-dc and netzfilter). each of them has more than hundred posts. for reasons i don’t understand the ac-dc posts are not displayed. i had to manually update each post. after the update the post was correctly displayed. since i have more than hundred posts the procedure of manually updating every post is not practible.
the netzfilter post type ist 100% displayed, the dc-dc post type ist mainly displayed, just a few posts are missing.i have no idea how to fix that, but manually updating the posts would be too much work. before the update all posts were displayed properly.
2.
on my home page i use 3 different forms to present new articles (e.g. the three custom post types mentioned above). since i display only 6 products in each results list there is no need for a search form, i just use the two shortcodes ([searchandfilter id=”x”] and [searchandfilter id=”x” show=”results”]) and then hid the search form via css. before the update this worked well and i could output the desired posts nicely.
after the update only the first form on the page works. the two other don’t work any more.i suppose that these issues are connected with the new caching feature, but i don’t know what to do and would appreciate any help!
best regards
Ross Moderator(Private) October 26, 2015 at 6:10 pm #28237Hey Allaedin
I’m working on a fix for this – I’ll email you a copy to test today/tomorrow 🙂
Thanks
Ross Moderator(Private) October 28, 2015 at 12:26 pm #28427Thought I sent this to you! Check your inbox now 🙂
Ross Moderator(Private) November 5, 2015 at 5:41 pm #29009Hi Allaedin
Sorry for the delay, I was sure I’d replied to this.
So it sounds like possibly your custom post type is being declared after S&F is running – so S&F doesn’t know it exists yet at the point of building the cache.
Are you declaring your CPTs in different places, or on different actions?
Thanks
Anonymous(Private) November 5, 2015 at 9:24 pm #29027I am having a similar problem with custom post types which might also be related to caching. For our custom post types we use ACF to create posts using a front-end form. POsts are saved as “draft.” Then the author can publish the custom post on the front-end using a button that changes the post status from “draft” to “published.” This is done via a function in our functions.php file using wp_update_post() and change_post_status().
Unfortunately, these new posts don’t show up in the search results. If I go into the search options in the back-end and click “rebuild cache” all the new posts will show up.
Perhaps we just need to add a hook or action in our functions.php file that makes sure when we change the post status to publish we also add the post to the cache?
Let me know… thanks.
Ross Moderator(Private) November 6, 2015 at 11:44 am #29052Hey Dan
Will do a quick test with this, if I’ve missed rebuilding the cache on
post_status
update then I’ll include it as a fix v soon.Thanks
Anonymous(Private) November 6, 2015 at 7:50 pm #29092hey ross,
i use the custom post type UI plugin to declare the custom post type. i don’t think, that search and filter doesn’T know it exists, since some posts are displayed, some are not (of the same custom post type).
all posts are published, so that shouldn’t be the reason either…
best regards
-
AuthorPosts