Forums Forums Search & Filter Pro Relevanssi Premium 1.16

Viewing 10 posts - 1 through 10 (of 24 total)
  • Anonymous
    #130056

    Since the update to Relevanssi Pro 1.16 filtering results with S&F Pro fails. No results are found.

    Relevanssi Premium has changed no only the way it hooks into the query ( filter the_posts instead of global $wp_query) but also some filter priorities. S&F Pro removes some of the filters to add/modify query arguments. My strong guess is the removal fails due to changed priorities and the Relevanssi defaults overwrite the filtered result set from S&F Pro. I haven’t verified this to save my customer some money and because S&F Pro officially integrates with Relevanssi which will need some modifications anyway due to the update.

    Trevor
    #130057
    This reply has been marked as private.
    Anonymous
    #130059

    Verified.

    In class Search_Filter_Third_Party you need to replace

    remove_filter(‘the_posts’, ‘relevanssi_query’);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’, 9);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’);
    remove_filter(‘query_vars’, ‘relevanssi_query_vars’);

    with

    remove_filter(‘the_posts’, ‘relevanssi_query’, 99);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’, 10);
    remove_filter(‘query_vars’, ‘relevanssi_query_vars’);

    to make Relevanssi Premium 1.16 and above to play nicely with S&F Pro.

    Anyway this should be tested in more detail to make sure there are no further issues.

    Regards

    Michael

    Anonymous
    #130224

    Hello!

    It seems like we have the same problem with Relevanssi and Search and filter pro. This sounds like the solution for us too!

    Where am I suppose to add this code? Is it in the plugin files?

    In class Search_Filter_Third_Party you need to replace

    remove_filter(‘the_posts’, ‘relevanssi_query’);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’, 9);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’);
    remove_filter(‘query_vars’, ‘relevanssi_query_vars’);

    with

    remove_filter(‘the_posts’, ‘relevanssi_query’, 99);
    remove_filter(‘posts_request’, ‘relevanssi_prevent_default_request’, 10);
    remove_filter(‘query_vars’, ‘relevanssi_query_vars’);

    When do you think this will be updated?

    Thanks a lot!

    Anonymous
    #130226

    Christoffer the code replacement would have to be done in /search-filter-pro/includes/class-search-filter-third-party.php within the function remove_relevanssi_defaults().

    But as I wrote this was just a quick research about the root cause of the problem I mentioned. More research has to be done to make sure the modification itself won’t cause other issues. Saying this I do not recommend applying this ‘patch’ for now especially if you are not a developer with good knowledge in wordpress plugin development and advanced knowledge of S&F and Relevanssi code.

    Please consider my post as a hint for Ross (S&F developer) as a starting point to save him time troubleshooting the issue.

    My recommendation is to downgrade to Relevanssi 1.15.4 until S&F gets an update to address the changes in Relevanssi 1.16. You can get previous versions of the plugin at https://www.relevanssi.com/download/.

    Anonymous
    #134938

    @trevor can you please give an update on this issue? There is a new security update from relevanssi and it is time to update. So we need the fix asap.

    Ross Moderator
    #135009
    This reply has been marked as private.
    Anonymous
    #135826
    This reply has been marked as private.
    Ross Moderator
    #135979
    This reply has been marked as private.
    Anonymous
    #139490
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 24 total)