Support » Plugin: Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] PHP errors search results breaking with Relevanssi

  • Hi,

    I am maintaining a WordPress site that was set up by someone else, so I’m running a bit blind. It is quite customised, so I imagine something along the line has conflicted with some plugins, but I cannot figure out what!

    I am getting the following errors:

    Notice: Undefined offset: 0 in /folder/path/wp-includes/plugin.php on line 764

    Notice: Undefined variable: wp_ver in /folder/path/wp-content/plugins/wordpress-popular-posts/wordpress-popular-posts.php on line 113

    Notice: Trying to get property of non-object in /folder/path/wp-content/plugins/efficient-related-posts/efficient-related-posts.php on line 285

    In addition, whenever the Relevanssi plugin tries to use the ‘Did you mean?’ suggestion, the search page breaks completely – it just cuts off just before the search results, like it can’t find an include or something. This is even more important than the above warnings, because I can just turn warnings off and the rest of the site works ok, but the search results breaking is not good!

    Can anyone give me an idea about what could be causing this?


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


    At least the last two notices are caused by other plugins (first by WordPress Popular Posts, second by Efficient Related Posts), not Relevanssi. I wouldn’t be too worried about them, particularly the Undefined variable. WordPress plugins are full of sloppy coding like that.

    Are you sure the relevanssi_didyoumean() function is called properly? Have you enabled logging of search results?

    If the function call is correct, then one way to check it is to put

    echo 'test'; exit();

    lines in the function code and see what’s causing the plugin to fail.

    The function is being called correctly, and logs are enabled. I tried the test suggested, and it breaks at this line:

    $data = $wpdb->get_results($q);

    What does that mean?

    Plugin Author Mikko Saari


    That’s the database call that fetches queries from logs. For some reason that’s not working. No idea why… So pretty much all I can suggest is that if the Did you mean feature is important to you, consider upgrading to Relevanssi Premium, which has a much better Did you mean feature anyway.

    I’ve taken out the ‘Did you mean’ link for now. If anyone has any more suggestions I’d love to hear them 🙂

    Thanks for your help msaari!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] PHP errors search results breaking with Relevanssi’ is closed to new replies.