• Just downgraded

    Notice: Undefined property: stdClass::$is_admin in /var/www/blog/wp-content/plugins/relevanssi/lib/search.php on line 1259

    Notice: Undefined index: paged in /var/www/blog/wp-content/plugins/relevanssi/lib/search.php on line 1261

    Notice: Use of undefined constant DOING_AJAX – assumed ‘DOING_AJAX’ in /var/www/blog/wp-content/plugins/relevanssi/lib/excerpts-highlights.php on line 79

    Notice: Use of undefined constant DOING_AJAX – assumed ‘DOING_AJAX’ in /var/www/blog/wp-content/plugins/relevanssi/lib/excerpts-highlights.php on line 79

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

    (@msaari)

    You’re passing a stdClass object to relevanssi_do_query(), when it is expecting a WP_Query object. If you’re creating the query object yourself, make sure you construct it with a new WP_Query().

    Thread Starter Juergen Schulze

    (@1manfactory)

    I am working by your hint

    https://www.relevanssi.com/knowledge-base/adding-search-form-shortcode/

    $url_segmente_array=getPathSegments($_SERVER['REQUEST_URI']);
    $query->query_vars['s'] = implode(" ", $url_segmente_array);
    $query->query_vars['posts_per_page'] = 8;
    $query->query_vars['post_type'] = 'product';
    $result_array=relevanssi_do_query($query);
    Plugin Author Mikko Saari

    (@msaari)

    a) Have you initialized the $query outside this bit of code? If not, then yeah, you’re going to have trouble. Start with

    $query = new WP_Query();

    b) Is there a reason you’re calling relevanssi_do_query(), instead of just changing the parameters with a pre_get_posts filter?

    Thread Starter Juergen Schulze

    (@1manfactory)

    Thanks for your quick answer and help. I got to test it. But at first glance it seams to work.

    I cam calling it because I am building my own short code (“search_form”) on the 404 page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error messages 3.5’ is closed to new replies.