You have an error in your SQL syntax; check the manual that corresponds to your

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 contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #47353
    SGY
    SGY
    Participant

    Hi 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&current_page_id=2

    Here 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 20000

    Can 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.

    #47354
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47356
    SGY
    SGY
    Participant

    Thanks 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?

    #47357
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Yes, of course – please check this documentation: https://documentation.ajaxsearchpro.com/general-settings/search-in-attachment-contents-pdf-word-excel-etc..

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.