WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Server error on live site (16 posts)

  1. jetlej
    Member
    Posted 2 years ago #

    I'm getting a server error on search result pages after moving my site from local to live. I've turned on debugging and see no errors. No settings have changed from my local version.

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

  2. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

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

  3. jetlej
    Member
    Posted 2 years ago #

    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'))
  4. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. jetlej
    Member
    Posted 2 years ago #

    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.

  6. jetlej
    Member
    Posted 2 years ago #

    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?

  7. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  8. jetlej
    Member
    Posted 2 years ago #

    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,
    	        $tag,
    	        $expids,
    	        $post_type,
    	        $tax, $tax_term,
    	        $operator,
    		$search_blogs,
    		$customfield_key,
    		$customfield_value,
    		$author);
    	}

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

  9. jetlej
    Member
    Posted 2 years ago #

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

  10. jetlej
    Member
    Posted 2 years ago #

    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!

  11. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

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

  12. jetlej
    Member
    Posted 2 years ago #

    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?

  13. jetlej
    Member
    Posted 2 years ago #

    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.

  14. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  15. jetlej
    Member
    Posted 2 years ago #

    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?

  16. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags