Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Results Not displaying for specific keywords
This topic contains 10 replies, has 2 voices, and was last updated by Ernest Marcinko 9 years, 7 months ago.
- AuthorPosts
- February 10, 2015 at 7:48 pm #3853
ADMIN URL – http://fairfieldschools.org/wp/admin
DEBUG URL – http://fairfieldschools.org/district-v2/debug.logSearch term – parent
February 10, 2015 at 8:01 pm #3854Hi!
I can only see 1 fatal error repeating in the log
PHP Fatal error: Call to undefined function get_schools_list() in /var/www/vhosts/fairfieldschools.org/district-v2/themes/FPS_District-v2/templates/partials/parents-our-schools-v2.php on line 15
It comes from the theme as you can see. Try to fix that issue in that file, it might fix the search issue as well if its related.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 10, 2015 at 8:04 pm #3855I believe we’re looking at a different log. As I see many lines of bugs. I have fixed that error however and the issue still persists.
The one regarding the AJAX search is:
[10-Feb-2015 18:42:00 UTC] PHP Notice: Trying to get property of non-object in /var/www/vhosts/fairfieldschools.org/district-v2/plugins/ajax-search-pro/functions.php on line 114
February 10, 2015 at 8:07 pm #3856The log updates ever minute or so. That’s only a notice it does cannot issue a an error 500 on the server, fatal errors do that.
The error is still there, look at the timestamp:
Best,10-Feb-2015 19:05:18 UTC PHP Fatal error: Call to undefined function get_schools_list() in /var/www/vhosts/fairfieldschools.org/district-v2/themes/FPS_District-v2/templates/partials/parents-our-schools-v2.php on line 15
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 10, 2015 at 9:05 pm #3860Strange, as I’m not seeing it in my logs now. I was calling a function publicly..but I guess it wanted to be called individually.
I will keep checking back, and make sure there are no Fatal Errors on the page. Once I have achieved that, I will retest the search feature and get back to you.
Thanks for the quick response.
February 10, 2015 at 10:21 pm #3862Hello again.
I have dug through all of the WP-Errors, the only one remaining is in regards to your plugin on the functions file. Its referencing the instance where your grabbing the POST DATA:
PHP Notice: Trying to get property of non-object in /var/www/vhosts/fairfieldschools.org/district-v2/plugins/ajax-search-pro/functions.php on line 114
Line 109-119: if (!function_exists("get_content_w")) { function get_content_w($id) { $my_postid = $id; $content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); return $content; } }
February 10, 2015 at 10:42 pm #3864Thanks!
It was a backup code in cases if the user selects custom field content, but the custom field is not accessible or doesn’t exist. I must have made forgot to re-factor the function. It should have look something like this:
if (!function_exists("get_content_w")) { function get_content_w($content) { $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); return $content; } }
Thanks for going through it 😉
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 10, 2015 at 10:53 pm #3865Hello Ernest,
Thanks, I’ve updated the functions file and will continue to monitor this.
Will this change be placed into your next version you deploy (so that I can still update) ?
Thanks
February 10, 2015 at 11:50 pm #3870Sure thing. This was intended to be changed in the current version.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 11, 2015 at 10:21 pm #3897The error has gone away, but has been replaced with another:
http://fairfieldschools.org/district-v2/debug.log
Check the first error that occurred on Feb 11 ([11-Feb-2015 00:16:12 UTC])
Something to do with:
CASE WHEN dist_ajaxsearchpro_priorities.priority IS NULL THEN 100 ELSE dist_ajaxsearchpro_priorities.priority END AS priority,
February 12, 2015 at 11:06 am #3900The error is not acutally causes by that part, it’s this:
WordPress database error Got error ‘trailing backslash (\)’
(lower(dist_posts.post_content) REGEXP 'paraprofessional|contract\\')
It’s either someone tried to search for a phrase with backslashes or attempting an SQL injection. the “\\” string might have been something else before processing. I would say it was not on purpose, doesn’t look like a injection pattern.
Anyways, it’s harmless because the wp database layer escapes and double checks everything and returns an error after terminating the query like this if something is not right, consequently the search returns no results.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.