Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › You have an error in your SQL syntax; check the manual that corresponds to your
- This topic has 3 replies, 2 voices, and was last updated 2 years, 2 months ago by
Ernest Marcinko.
-
AuthorPosts
-
March 14, 2024 at 11:21 pm #47353
SGY
ParticipantHi there support,
We are getting mime-type errors when we activate the PDF search feature and using the search on the front end.
Please see an example of the error here:
http://smca.sgyagency.com.au/?s=private&asp_active=1&p_asid=1&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0¤t_page_id=2Here is the output of the error:
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 ( wp_posts.post_mime_type IN ('application/pdf') ) ' at line 34] SELECT wp_posts.ID as id, 1 as blogid, wp_posts.post_title as title, wp_posts.post_date as date, wp_posts.post_content as content, wp_posts.post_excerpt as excerpt, wp_posts.post_type as post_type, wp_posts.post_mime_type as post_mime_type, wp_posts.guid as guid, 'attachment' as content_type, 'attachments' as g_content_type, (SELECT wp_users.display_name as author FROM wp_users WHERE wp_users.ID = wp_posts.post_author ) as author, '' as ttid, wp_posts.post_type as post_type, 100 AS priority, 1 AS group_priority, 1 AS p_type_priority, (1) as relevance, 1 as customfp, 1 as customfs FROM wp_posts WHERE (wp_posts.post_type = 'attachment' ) AND (wp_posts.post_status = 'inherit' ) AND ( () ) AND ( wp_posts.post_mime_type IN ('application/pdf') ) AND (1) AND ((1)) GROUP BY wp_posts.ID ORDER BY priority DESC, relevance DESC, wp_posts.post_date DESC LIMIT 20000Can you please provide support and troubleshooting for this issue.
PS: We do not have FTP open on our server so any code changes will need to be done by our agency.
March 15, 2024 at 9:26 am #47354Ernest Marcinko
KeymasterHi,
Thank you!
Fortunately it was only a minor configuration issue. There was no field selected to search for. I have changed so that at least the document titles are searched, and the issue is resolved now.
March 15, 2024 at 1:58 pm #47356SGY
ParticipantThanks for the prompt reply Ernest.
We were expecting the search to index the PDF content too.
Is there an option for Ajax search to filter search results by the content included within PDF files as well?March 15, 2024 at 2:08 pm #47357Ernest Marcinko
KeymasterYes, of course – please check this documentation: https://documentation.ajaxsearchpro.com/general-settings/search-in-attachment-contents-pdf-word-excel-etc..
-
AuthorPosts
- You must be logged in to reply to this topic.