Well, that’s strange. Have you tried removing Relevanssi completely and reinstalling it?
Install the latest version of Relevanssi (2.1.5), then add following line to the script at line 767:
var_dump($query);
After the line with $query = ... and before line $matches = .... Let me know what that says.
Also, you could try uncommenting the debugging lines in the beginning:
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
Like this:
error_reporting(E_ALL);
ini_set("display_errors", 1);
and report any error messages that shows.
Yes, I’ve tried uninstalling and reinstalling relevanssi several times, also trying various version of relevanssi since 2.03 until 2.15.
I did exactly as you suggested (to my localhost copy), and here is the error message showed up:
Deprecated: Function split() is deprecated in C:\xampplite\htdocs\wordpress2\wp-content\plugins\relevanssi\relevanssi.php on line 599
string(88) "SELECT doc, term, tf, title FROM wp_relevanssi WHERE term = 'purple' AND doc IN (667)" string(90) "SELECT doc, term, tf, title FROM wp_relevanssi WHERE term = 'bedrooms' AND doc IN (667)"
Notice: Undefined variable: term_hits in C:\xampplite\htdocs\wordpress2\wp-content\plugins\relevanssi\relevanssi.php on line 870
Ok, looks like that might be the problem – you’re running a new version of PHP (5.3.0) that has deprecated the split() function. Your other setups have older PHP where using split() is fine and dandy.
Here’s what you can do: find the bit of the code that has the split() function and just swap the split to explode. If I’m right, that should fix it.
I’ve made change to all split to explode. Soon I checked it by do a search on the blog. Still no results, and here is the error message: (‘purple bedroom’ is the keyword)
string(88) "SELECT doc, term, tf, title FROM wp_relevanssi WHERE term = 'purple' AND doc IN (667)" string(89) "SELECT doc, term, tf, title FROM wp_relevanssi WHERE term = 'bedroom' AND doc IN (667)"
Notice: Undefined variable: term_hits in C:\xampplite\htdocs\wordpress2\wp-content\plugins\relevanssi\relevanssi.php on line 870
Well, let’s get rid of that notice and see if that helps. On line 726, after $scores = array(); add $term_hits = array();
In general notices shouldn’t prevent a PHP script from running, but perhaps your system is set up to hang on the smallest of errors.
Msaari, I think the problem absolutely is not in your plugin, it could be on database or somewhere else.
Thank you so much for your support 🙂
thinkin 'bout suicide
Hi Msaari, finally the problem solved by latest relevanssi update. Thanks for your great plugin!