Forums › Forums › Search & Filter Pro › Delete posts are not remove from caching tables
- This topic has 12 replies, 3 voices, and was last updated 8 years, 7 months ago by
Anonymous.
-
Anonymous(Private) September 7, 2016 at 8:52 pm #56863
Hi Trevor,
The endgoal is to delete the posts but I’ve tried both wp_delete_post (with forced delete) and wp_trash_post followed by wp_delete_post to remove the posts.In both cases the posts are still in S&F caching tables after the post is deleted.
Anonymous(Private) September 7, 2016 at 9:53 pm #56877Yes, I am indeed doing this with code.
I’ve tried using do_action(‘search_filter_update_post_cache’, $post_id).However if I call this after wp_trash_post the post is still in the caching tables.
If I call the action after wp_delete_post the post is removed from the caching tables but it causes several php-errors:[07-Sep-2016 19:59:17 UTC] PHP Notice: Trying to get property of non-object in C:\xampp\htdocs\local\wp-content\plugins\search-filter-pro\includes\class-search-filter-post-cache.php on line 1159 [07-Sep-2016 19:59:17 UTC] PHP Notice: Trying to get property of non-object in C:\xampp\htdocs\local\wp-content\plugins\search-filter-pro\includes\class-search-filter-post-cache.php on line 1560 [07-Sep-2016 19:59:17 UTC] PHP Notice: Trying to get property of non-object in C:\xampp\htdocs\local\wp-content\plugins\search-filter-pro\includes\class-search-filter-post-cache.php on line 1193 [07-Sep-2016 19:59:17 UTC] WordPress databasefout Column 'post_parent_id' cannot be null bij query INSERT INTO <code>wp_search_filter_cache</code> (<code>post_id</code>, <code>post_parent_id</code>, <code>field_name</code>, <code>field_value</code>) VALUES (7940, NULL, '', '') gemaakt door require('C:\xampp\htdocs\local\wp-blog-header.php'), require_once('C:\xampp\htdocs\local\wp-load.php'), require_once('C:\xampp\htdocs\local\wp-config.php'), require_once('C:\xampp\htdocs\local\wp-settings.php'), do_action('init'), call_user_func_array, siw_wc_trash_projects, do_action('search_filter_update_post_cache'), call_user_func_array, Search_Filter_Global->update_cache, Search_Filter_Post_Cache->update_post_cache
Ross Moderator(Private) September 19, 2016 at 10:13 am #58726Hey Maarten, I am working on this, will udpate this afternoon 🙂
Thanks
Ross Moderator(Private) September 20, 2016 at 8:57 pm #59085Its looking like tomorrow we’ll have this sorted.
Thanks
Ross Moderator(Private) September 22, 2016 at 5:11 pm #59610This reply has been marked as private. -
AuthorPosts