Search not working when logged out and SQL errors

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search not working when logged out and SQL errors

This topic contains 6 replies, has 2 voices, and was last updated by lonemill lonemill 1 year ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41191
    lonemill
    lonemill
    Participant

    I am having a strange issue where search only works when logged into the site. Logged out and incognito returns 0 results, or if I remove the search string it will return all results.

    This is the search bar on the homepage.

    I am also receiving a lot of sql query errors in our logs from the plugin (see attached). Perhaps it’s related. Can you please help?

    Plugin version 4.25.1

    Attachments:
    You must be logged in to view attached files.
    #41193
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details!

    Interestingly, the MySQL log refers to a syntactical error, when there is none in the log, so maybe there is a missing part. I am suspecting the file may have been corrupted, it can happen if it was uploaded via FTP.

    • Can you please try downloading the plugin from codecanyon, then uninstalling, deleting and installing it again? That will refresh the files. Your settings, search instances etc.. will remain as is.
    • Try turning OFF the custom ajax handler too, that may cause conflicts in some cases.
    Best,
    Ernest Marcinko

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


    #41206
    lonemill
    lonemill
    Participant

    Thanks Ernest. I just disabled/uninstalled/reinstalled the plugin as well as turned off the ajax handler and still seeing the same results as well as the error being generated in the log.

    Any other ideas?

    #41212
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay, then I have to debug through this. Can you please add temporary FTP and back-end details? I will have to make direct changes to the code to track the conflict.

    Best,
    Ernest Marcinko

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


    #41223
    lonemill
    lonemill
    Participant
    You cannot access this content.
    #41227
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    I managed to find the issue. A 3rd party script is contaminating the search settings form in the header with additional inputs, as you can see on this screenshot. This is not part of the plugin, this element is injected into the search form itself, and when the search is initiated it is sent to the back-end. It looks like it is for some sort of cookie validation or something similar.

    That alone would not be an issue whatsoever, however after the data is sent to the back-end, when it reaches to ajax search pro, these options are completely wiped out, so malformed data is reaching the plugin, causing the issue.

    I suspect this is caused by one of the plugin scripts – something to do with cookies/firewall or something similar. The element is injected, so I can’t trace it back to the origin, but based on the injector function name apbct_attach_event_handler__backend it seems to be Spam protection, AntiSpam, FireWall by CleanTalk. If you use a plugin by that name or anything similar, then it is very likely causing the problem.

    Best,
    Ernest Marcinko

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


    #41230
    lonemill
    lonemill
    Participant

    Thank you Ernest, I’ll look into that other plugin. Appreciate the help.

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

You must be logged in to reply to this topic.