We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    Any other things that I can try?
    1/ download and install the last release of ajaxSearch : ajaxsearch 1.9.2 This last release includes the fix for:
    ==== AJAXSEARCH-75 : exactphrase doesn’t work when the value is passed thru snippet call
    See http://modxcms.com/forums/index.php/topic,55236.0.html

    More information on this release on this page or on this post.

    2/ open the file classes/ajaxSearch.class.inc.php and change the line #16 => define(’MIN_CHARS’, 2); // minimum number of characters
    3/ use the "exactphrase" mode by adding &advSearch=`exactphrase` in the 2 ajaxSearch snippet calls
      • 9930
      • 23 Posts
      coroico, thanks for that information.

      Unfortunately, I’m getting the same result. embarrassed I’m relatively new to MODx so I’ll detail what I’ve done to see if I missed anything.

      - Uploaded the contents of the 1.92 upgrade to the ajaxsearch folder
      - Pasted the contents of the snippet.ajaxsearch.txt file to the snippet code in MODx
      - Updated the 2 chunks containing the snippet call to:
      Search Box
      [!AjaxSearch? &ajaxSearch=`0` &advSearch="exactphrase" &minChars="2" &mbstring=`0` &showResults=`0` &landingPage=`78`!]


      and

      Search page
      [!AjaxSearch? &ajaxSearch=`0` &advSearch="exactphrase" &mbstring=`0` &showInputForm=`0`!]


      - Changed line 16 of ajaxSearch.class.inc.php to define(’MIN_CHARS’, 2); // minimum number of characters

      I’ve also cleared the cache prior to testing. Here is the site: http://www.montagueco.com/test/octagon_test/

      Thanks
        • 5811
        • 1,717 Posts

        Try to add &minChars="2" in your search results page too:

        [!AjaxSearch? &ajaxSearch=`0` &advSearch="exactphrase" &minChars="2" &mbstring=`0` &showInputForm=`0`!]
          • 9930
          • 23 Posts
          That did it grin

          Thanks for your help!