We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24880
    • 2 Posts
    Hi

    When using AjaxSearch, if there are no matching results then the following message is displayed:-
    ’There were no search results. Please try using more general terms to get more results.’


    I would appreciate some help in modifying this action.
    What I would like to happen is the following, when a search fails to return valid results:-

    1.
    A comments area to allow the users to explain what content was expected, or what they would like included, so that I can consider adding it to the site.
    I imagine that Jot will do this - I just need to find a way to redirect a nil search result to a page containing Jot.

    2.
    A bit more challenging, I think - I want to capture all failed search input, either into the Db or into a simple text file. Again, this is so that I can see what users are failing to find so that I can add more useful content. I dont want to capture successful search criteria. This information would be for administrator access, not for public viewing.

    I intend to have a go at number 1, though help would be appreciated.
    I have no idea how to achieve number 2: Please can someone point me in the right direction? ...

    Retro
      • 25663 MODX Staff
      • 12,272 Posts
      I love the idea for capturing failed searches. Great suggestion. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 5811
        • 1,717 Posts
        1.
        A comments area to allow the users to explain what content was expected, or what they would like included, so that I can consider adding it to the site.
        I imagine that Jot will do this - I just need to find a way to redirect a nil search result to a page containing Jot.
        2.
        A bit more challenging, I think - I want to capture all failed search input, either into the Db or into a simple text file. Again, this is so that I can see what users are failing to find so that I can add more useful content. I dont want to capture successful search criteria. This information would be for administrator access, not for public viewing.
        The 1/ needs to change the layout tpl in order to catch the [+as.noResultText+] value and then integrate a jot comment template request

        The 2/ needs development in AS but seems not so tricky to implement. I catch the idea for a further version. And a text file solution, should be light and easier to manage by an administrator.

          • 3749
          • 24,544 Posts
          Remember that a failed search (one that turns up no results) is different from a search that turns up stuff the user doesn’t want. You might want to offer a form below all search results that will let the user submit information.

          While you’re at it, you might as well fix the forum search. wink wink wink

          I never get used to it turning up no results for stuff I know is there. :’(
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 24880
            • 2 Posts
            Thanks for your comments and help.

            I will let you know when (if) I make any progress on this during the next few weeks.

            Good idea to include a ’did you find what you are looking for?’ option for all searches - I will have a think about that...


            Retro.
              • 5811
              • 1,717 Posts
              About this topic, thanks to look at this new post: AjaxSearch Log manager and failed search criteria