WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
PHP errors + search results breaking with Relevanssi (5 posts)

  1. zenkaty
    Member
    Posted 2 years ago #

    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?

    Katy

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. zenkaty
    Member
    Posted 2 years ago #

    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?

  4. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. zenkaty
    Member
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic