Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Using search function on website loads for a long time and gives error message

$
0
0

Replies: 0

Using the search bar on my website at the top menu (with the image of a magnifying glass), and entering a word to search for will cause the page to load for a very long time.

Oftentimes, this will result in an error message where 0 results are found (even though there should be results), with a recent one I’ve seen being the following:

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND (((wp_posts.post_title LIKE ‘%persona%’) OR (wp_posts.post_excerpt LIKE ‘%persona%’) OR (wp_posts.post_content LIKE ‘%persona%’) OR (wp_posts.post_content REGEXP ‘\\[table id=([“\’]?)(1|2|3|4|9|10|11|12|14|15|16|17|18|19|24|25|26)([\]”\’ /])’)) AND ((wp_posts.post_title LIKE ‘%5%’) OR (wp_posts.post_excerpt LIKE ‘%5%’) OR (wp_posts.post_content LIKE ‘%5%’) OR (wp_posts.post_content REGEXP ‘\\[table id=([“\’]?)(1|3|4|5|9|10|12|14|16|17|18|19|22|23|24|25|26|27)([\]”\’ /])’)) AND ((wp_posts.post_title LIKE ‘%commercial%’) OR (wp_posts.post_excerpt LIKE ‘%commercial%’) OR (wp_posts.post_content LIKE ‘%commercial%’))) AND (wp_posts.post_password = ”) AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘tribe_events’) AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘tribe-ea-success’ OR wp_posts.post_status = ‘tribe-ea-failed’ OR wp_posts.post_status = ‘tribe-ea-schedule’ OR wp_posts.post_status = ‘tribe-ea-pending’ OR wp_posts.post_status = ‘tribe-ea-draft’) ORDER BY (CASE WHEN wp_posts.post_title LIKE ‘%persona 5 commercial%’ THEN 1 WHEN wp_posts.post_title LIKE ‘%persona%’ AND wp_posts.post_title LIKE ‘%5%’ AND wp_posts.post_title LIKE ‘%commercial%’ THEN 2 WHEN wp_posts.post_title LIKE ‘%persona%’ OR wp_posts.post_title LIKE ‘%5%’ OR wp_posts.post_title LIKE ‘%commercial%’ THEN 3 WHEN wp_posts.post_excerpt LIKE ‘%persona 5 commercial%’ THEN 4 WHEN wp_posts.post_content LIKE ‘%persona 5 commercial%’ THEN 5 ELSE 6 END), wp_posts.post_date DESC LIMIT 0, 10

I can’t think of any recent changes that have occurred which could have lead to this happening. Trying to go to “Next Page” on the page for the word you’re searching for will perpetuate the issues, as well.

WordPress Version: Version 4.9.5

  • This topic was modified 47 seconds ago by Reggy.

Viewing all articles
Browse latest Browse all 59525

Trending Articles