Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Keyword search (no results) does not work when ajax is enabled

Viewing 9 posts - 1 through 9 (of 9 total)
  • Travis Johnson
    #234409

    Hello,

    I’ve come across an issue with keyword search. I have a search form with a variety of filter options (keyword, taxonomy, date range). Ajax and auto-count are enabled. Filtering works correctly with all options (they’re all checkboxes) except for keyword search; specifically, when searching by a keyword that should not have any results. If I search a bad keyword/phrase (one that I know does not have any results) the posts lists fades in and out as if it’s filtering but does not actually change. If I navigate to the URL directly, I’ll see the correct no results message. Searching a keyword with results does filter correctly, however.

    Travis Johnson
    #234410
    This reply has been marked as private.
    Trevor Moderator
    #234439

    I can see that you are using the Custom display results method. Does this page use a custom PHP template to output the results? If not, how is the form linked to the results?

    Travis Johnson
    #234518

    Yes, it’s using a custom page template with the ‘search_filter_id’ parameter.

    Trevor Moderator
    #234535

    Can you show me what is in that page template file, maybe upload that file to a file sharing site and share the link with me?

    Travis Johnson
    #234640

    Sure. Here is an example: https://drive.google.com/file/d/162ATlzZ4HoSGA3BjAJg0cPCiqZt4SQJY/view?usp=sharing

    We’re using Sage 9 here which uses a view/controller for templating. So there is the resources.php with the queries and resources.blade.php with the HTML output. Not sure if that would have any impact on front-end behavior.

    Trevor Moderator
    #234768

    Before I take a look at that, does the section (div) that has the message ‘No Results Found’ have the same Ajax Container classname (or ID) as the results? If it does not, that would cause what you see. Or, is the ‘No Results Found’ message outside that container?

    Travis Johnson
    #235232

    That was the fix! Thanks much for the insight.

    Trevor Moderator
    #235234

    Thanks for letting me know. I will close this thread for now.

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

The topic ‘Keyword search (no results) does not work when ajax is enabled’ is closed to new replies.