• Resolved yodjii

    (@yodjii)


    Hi,

    It looks like relevantss search are not triggered any more : I got zero query in Relevanssi stats. Search is still working, I got results when keywords are in post titles.

    I have done :
    Make sure you have the latest version of Relevanssi. If not, upgrade.
    Try deactivating the plugin and reactivating it.
    Are you using Yoast Local SEO? Read this.
    Try deleting the plugin and reinstalling it from scratch.
    Checked query_posts and variation

    Search page code : https://pastebin.com/yeCV7ND9

    global $wp_query; var_dump($wp_query->query_vars);
    =>
    array(66) { [“s”]=> string(17) “cours de francais” [“error”]=> string(0) “” [“m”]=> string(0) “” [“p”]=> int(0) [“post_parent”]=> string(0) “” [“subpost”]=> string(0) “” [“subpost_id”]=> string(0) “” [“attachment”]=> string(0) “” [“attachment_id”]=> int(0) [“name”]=> string(0) “” [“pagename”]=> string(0) “” [“page_id”]=> int(0) [“second”]=> string(0) “” [“minute”]=> string(0) “” [“hour”]=> string(0) “” [“day”]=> int(0) [“monthnum”]=> int(0) [“year”]=> int(0) [“w”]=> int(0) [“category_name”]=> string(0) “” [“tag”]=> string(0) “” [“cat”]=> string(0) “” [“tag_id”]=> string(0) “” [“author”]=> string(0) “” [“author_name”]=> string(0) “” [“feed”]=> string(0) “” [“tb”]=> string(0) “” [“paged”]=> int(0) [“meta_key”]=> string(0) “” [“meta_value”]=> string(0) “” [“preview”]=> string(0) “” [“sentence”]=> string(0) “” [“title”]=> string(0) “” [“fields”]=> string(0) “” [“menu_order”]=> string(0) “” [“embed”]=> string(0) “” [“category__in”]=> array(0) { } [“category__not_in”]=> array(0) { } [“category__and”]=> array(0) { } [“post__in”]=> array(0) { } [“post__not_in”]=> array(0) { } [“post_name__in”]=> array(0) { } [“tag__in”]=> array(0) { } [“tag__not_in”]=> array(0) { } [“tag__and”]=> array(0) { } [“tag_slug__in”]=> array(0) { } [“tag_slug__and”]=> array(0) { } [“post_parent__in”]=> array(0) { } [“post_parent__not_in”]=> array(0) { } [“author__in”]=> array(0) { } [“author__not_in”]=> array(0) { } [“post_type”]=> string(7) “societe” [“posts_per_page”]=> int(30) [“suppress_filters”]=> bool(true) [“ignore_sticky_posts”]=> bool(false) [“cache_results”]=> bool(true) [“update_post_term_cache”]=> bool(true) [“lazy_load_term_meta”]=> bool(true) [“update_post_meta_cache”]=> bool(true) [“nopaging”]=> bool(false) [“comments_per_page”]=> string(2) “50” [“no_found_rows”]=> bool(false) [“search_terms_count”]=> int(3) [“search_terms”]=> array(2) { [0]=> string(5) “cours” [1]=> string(8) “francais” } [“search_orderby_title”]=> array(2) { [0]=> string(164) “wp_posts.post_title LIKE ‘{84355d6aa163e2a8abc25ccfca1ad9b338acd787f49fd8191cf2cb69c95d1611}cours{84355d6aa163e2a8abc25ccfca1ad9b338acd787f49fd8191cf2cb69c95d1611}'” [1]=> string(167) “wp_posts.post_title LIKE ‘{84355d6aa163e2a8abc25ccfca1ad9b338acd787f49fd8191cf2cb69c95d1611}francais{84355d6aa163e2a8abc25ccfca1ad9b338acd787f49fd8191cf2cb69c95d1611}'” } [“order”]=> string(4) “DESC” }

    Thanks !

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If you try using the Relevanssi admin search (Dashboard > Admin search), does that get you results?

    Are the results you’re getting Relevanssi results? If you change Relevanssi settings, for example the weights, do the results change as well?

    Thread Starter yodjii

    (@yodjii)

    It gets stucks in “Searching…”

    Response from ajax query :
    array(53) {
    [“post_types”]=>
    string(3) “any”
    [“s”]=>
    string(5) “cours”
    [“error”]=>
    string(0) “”
    [“m”]=>
    string(0) “”
    [“p”]=>
    int(0)
    [“post_parent”]=>
    string(0) “”
    [“subpost”]=>
    string(0) “”
    [“subpost_id”]=>
    string(0) “”
    [“attachment”]=>
    string(0) “”
    [“attachment_id”]=>
    int(0)
    [“name”]=>
    string(0) “”
    [“pagename”]=>
    string(0) “”
    [“page_id”]=>
    int(0)
    [“second”]=>
    string(0) “”
    [“minute”]=>
    string(0) “”
    [“hour”]=>
    string(0) “”
    [“day”]=>
    int(0)
    [“monthnum”]=>
    int(0)
    [“year”]=>
    int(0)
    [“w”]=>
    int(0)
    [“category_name”]=>
    string(0) “”
    [“tag”]=>
    string(0) “”
    [“cat”]=>
    string(0) “”
    [“tag_id”]=>
    string(0) “”
    [“author”]=>
    string(0) “”
    [“author_name”]=>
    string(0) “”
    [“feed”]=>
    string(0) “”
    [“tb”]=>
    string(0) “”
    [“paged”]=>
    int(0)
    [“meta_key”]=>
    string(0) “”
    [“meta_value”]=>
    string(0) “”
    [“preview”]=>
    string(0) “”
    [“sentence”]=>
    string(0) “”
    [“title”]=>
    string(0) “”
    [“fields”]=>
    string(0) “”
    [“menu_order”]=>
    string(0) “”
    [“embed”]=>
    string(0) “”
    [“category__in”]=>
    array(0) {
    }
    [“category__not_in”]=>
    array(0) {
    }
    [“category__and”]=>
    array(0) {
    }
    [“post__in”]=>
    array(0) {
    }
    [“post__not_in”]=>
    array(0) {
    }
    [“post_name__in”]=>
    array(0) {
    }
    [“tag__in”]=>
    array(0) {
    }
    [“tag__not_in”]=>
    array(0) {
    }
    [“tag__and”]=>
    array(0) {
    }
    [“tag_slug__in”]=>
    array(0) {
    }
    [“tag_slug__and”]=>
    array(0) {
    }
    [“post_parent__in”]=>
    array(0) {
    }
    [“post_parent__not_in”]=>
    array(0) {
    }
    [“author__in”]=>
    array(0) {
    }
    [“author__not_in”]=>
    array(0) {
    }
    [“relevanssi_admin_search”]=>
    bool(true)
    }

    Plugin Author Mikko Saari

    (@msaari)

    If it’s stuck at “Searching…”, is there perhaps an error in the browser Javascript console?

    Thread Starter yodjii

    (@yodjii)

    No error in console.
    Is it normal to get a raw php array as response from the ajax query ?

    [URL-website]wp-admin/admin-ajax.php?_fs_blog_admin=true
    Post Data sent :
    action: relevanssi_admin_search
    args:
    posts_per_page: 0
    post_types: any
    s: coiffeur
    security: 49386044f5

    Thanks

    Thread Starter yodjii

    (@yodjii)

    Ok so raw php array came from adding those
    add_filter( ‘relevanssi_results’, ‘rlv_check_results’ );
    function rlv_check_results( $results ) {
    var_dump( $results );
    exit();
    }

    I removed thoses lines

    So now I got correct results in Dashboard > Admin search !!
    I still don’t have correct result in the front-end.

    I desactivated all plugins except relevanssi and still have the issue ??

    Thread Starter yodjii

    (@yodjii)

    Great I got the reason behind this.

    I earlier apply this patch to fix a bug and that prevent relevansii to be trigerred in the main search

    // https://wordpress.stackexchange.com/questions/223216/have-posts-return-false-but-count-says-3

    add_filter(‘pre_get_posts’, ‘add_custom_post_type_to_query’);
    function add_custom_post_type_to_query($query) {
    // We do not want unintended consequences.
    if ( is_admin() || ! $query->is_main_query() ) {
    return;
    }

    // Check if custom taxonomy is being viewed
    if( /*is_tax() &&*/ empty( $query->query_vars[‘suppress_filters’] ) )
    {
    $query->set( ‘suppress_filters’, true );
    }
    }

    Plugin Author Mikko Saari

    (@msaari)

    So problem solved then? (Setting suppress_filters to true should have no effect on Relevanssi, but who knows.)

    Thread Starter yodjii

    (@yodjii)

    yes problem solved by commenting/removing this code section. thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘relevantssi search not triggered’ is closed to new replies.