Quote Mark in Search Causing Database Error

Posted in: Newspaper
Post count: 8

Hello,
i saw alot of database errors in my wordpress website related to search query, if some searches with quote mark in qury like “Let’s Go” it causes WordPress database error, I disabled all plugins then I activated td-composer first and searched with quotes marks and I saw database error, kindly guide me on how to fix this. i am sure now that problem is caused by td-composer.

here is the error I get
‘WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘s Go%’) ) OR ( wplp_term_taxonomy.description LIKE (‘%Let\’s Go%’) )
GRO…’ at line 15 for query
SELECT SQL_CALC_FOUND_ROWS wplp_posts.ID
FROM wplp_posts

Post count: 21065

Hello @khzeshan5 !

I’ve tested on my end and the error is not appearing.
Check this guide: https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows

Thank you!

Post count: 8

i figured out the problem, “SEARCH IN TAXONOMY TERMS” Option was enabled in TEMPLATE SETTINGS > Search Template, I disabled it and the problem is gone.

https://imgur.com/a/7aM922b

Thank You

Post count: 21065

Hello @khzeshan5 !

I’m glad that you solved the issue.
Let me know if you need further assistance.

Have a wonderful day!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.