Support » Plugins and Hacks » [Plugin: Relevanssi – A Better Search] Server error on live site

[Plugin: Relevanssi – A Better Search] Server error on live site

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


    Anything in your server error log? Are you using the “Did you mean” feature?

    Strangely there are no errors in the server error log. I do have the ‘Did you mean’ feature, but I just tried taking it out and still got the server error.

    Btw if I switch back to Relevanssi Non-Premium, the results page gives me this instead of a server error:

    WordPress database error: [Unknown column 'tf' in 'field list']
    SELECT doc, term, tf, title FROM wp_relevanssi WHERE (term LIKE '%dun' OR term LIKE 'dun%') AND doc IN (SELECT DISTINCT(ID) FROM wp_posts WHERE post_type IN ('post','page','attachment','topic','reply','video','image','quote','link'))
    Plugin Author Mikko Saari


    That problem is no surprise, as the free and premium versions have different database structure. If you want to switch back to the free version, you must uninstall Premium and reinstall the free.

    I want to use the Premium version. I just deactivated premium, activated normal relevanssi, then removed all plugin data. Now when I reactive premium I get database errors like WordPress database error: [Table ‘intellf0_hethen.wp_relevanssi’ doesn’t exist]
    SELECT COUNT(DISTINCT doc) FROM wp_relevanssi

    How do I start over from scratch? I don’t see any remove button within premium.

    I was able to get rid of the errors in premium by manually deleting the relevanssi rows in wp-options but I’m stil getting the blank page when I try to search. No errors logged.

    Any ideas?

    Plugin Author Mikko Saari


    Deactivate the plugin and uninstall. Then reinstall from scratch to get the databases in place.

    When you removed all plugin data, you removed the Relevanssi database and just activating the plugin doesn’t necessarily install it back. You need to reinstall.

    No ideas what could be causing the blank page. You’d need to figure out where in the process it breaks. Inserting breaks in the process might show where it is that it breaks down: Does relevanssi_do_query() run? Does relevanssi_search() run? Where in relevanssi_search() it breaks down? That sort of thing.

    I can get a PHP error by inserting a bad query up until the only line within this else statement in relevanssi_do_query() :

    else {
         $return = relevanssi_search($q,
                    $cat, $excat,
    	        $tax, $tax_term,

    If I place it after setting the value of $return, no errors are returned. Does that tell you anything?

    Just realized I can error check in that function also… sorry I’m new to PHP. Checking that now.

    Okay the actual breakpoint is the following line from within relevanssi_get_post_types():

    $results = $wpdb->get_results("SELECT ID, post_type FROM $wpdb->posts");

    Any ideas on that?

    Thank you SO much for you help!

    Plugin Author Mikko Saari


    Sorry, no – that’s just about as basic DB call as there can be. Some sort of problem with your database?

    Could you please give me a sample array of the call so I can populate it with my post_types manually until I figure it out?

    Nevermind. Even MORE bizarre, I ran the returned SQL query through phpMyAdmin and found no errors. So I then tracked the error all the way down to the return of the results. It seems the PHP return function is broken…haha. So I give up.

    Plugin Author Mikko Saari


    It’s probably caused by server running out of memory or something like that.

    The call returns objects that have the post ID and the post_type – but I don’t know how you’re going to get that data without making the database call.

    You were right, it was a memory issue. Upping my PHP memory limit to 88M did the trick. Does that sound too high? Should I be looking for a memory leak within the search function?

    Plugin Author Mikko Saari


    No idea. If you can find a leak, then that’s great, I’m not particularly good at something like that.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Server error on live site’ is closed to new replies.