Empty search not working
-
Hello,
I have recently updated the Search Everything plugin from to v 8.1.9 and now there are no results returned if the search term is empty (normally all results should be returned).
The problem, as shown on the page:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘))) AND alp_posts.post_type = ‘job’ AND (alp_posts.post_status = ‘publish’ OR alp_’ at line 1]SELECT SQL_CALC_FOUND_ROWS alp_posts.ID FROM alp_posts WHERE 1=1 AND ((())) AND alp_posts.post_type = ‘job’ AND (alp_posts.post_status = ‘publish’ OR alp_posts.post_status = ‘acf-disabled’ OR alp_posts.post_status = ‘private’) ORDER BY alp_posts.post_date DESC LIMIT 0, 5
The only thing that I do custom is hook into pre_get_posts and set the post type.
But i’ve also tested the default search (no custom action) and it’s the same issue caused by the ((()))SELECT SQL_CALC_FOUND_ROWS alp_posts.ID FROM alp_posts WHERE 1=1 AND ((())) AND alp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘job’) AND (alp_posts.post_status = ‘publish’ OR alp_posts.post_status = ‘acf-disabled’ OR alp_posts.post_author = 1 AND alp_posts.post_status = ‘private’) ORDER BY alp_posts.post_date DESC LIMIT 0, 5
Looking forward to hearing from you.
Thank you
Anda
- The topic ‘Empty search not working’ is closed to new replies.