Forums Forums Search & Filter Pro Delete posts are not remove from caching tables

Viewing 10 posts - 1 through 10 (of 13 total)
  • Anonymous
    #56659

    When I delete posts (both directly and via the trash) they are not removed from the caching tables unless I manually rebuild the cache. Is there another way to remove deleted posts from the cache?

    Trevor
    #56832

    Are they deleted or in the trash bin?

    Anonymous
    #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.

    Trevor
    #56864

    Are you doing this in code, in which case maybe you also need to run a quick update to the cache:

    https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Update_Cache_for_a_Particular_Post

    Anonymous
    #56877

    Yes, 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
    Trevor
    #56958

    I will ask the developer, Ross, for his advice.

    Anonymous
    #58701

    Hi Trevor,

    Is there any news on this?

    Ross Moderator
    #58726

    Hey Maarten, I am working on this, will udpate this afternoon 🙂

    Thanks

    Ross Moderator
    #59085

    Its looking like tomorrow we’ll have this sorted.

    Thanks

    Ross Moderator
    #59610
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 13 total)