We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • ok, i solved my problem like this :

    in the file « ajaxSearchRequest.class.inc.php »
    line 45 :

    function doSearch($searchString, $advSearch, $cfg, $bsf, $fClause) {

    i just put « $advSearch = "exactphrase"; »
    just after the « global $modx »

    c’est un tantinet du bricolage, but it seem to work !!

    thanks for your fast help
      made with MODx => France Douglas || Vintage Weekender
      • 5811
      • 1,717 Posts
      A wrong initialisation in the jsscript!

      Take the jsfile attached (remove the .patch extension) and drop it in the js/ajaxSearch1 folder. This should solve this bug for mootools 1.2

        • 5811
        • 1,717 Posts
        Don’t forget to clear your browser cache before test it
        • Ooops… just tried it and :

          SyntaxError: Parse error

          indicator.white.gifFailed to load resource: the server responded with a status of 404 (Not Found)
            made with MODx => France Douglas || Vintage Weekender
            • 5811
            • 1,717 Posts
            It works locally on my demo site with [!AjaxSearch[*asversion*]? &advSearch=`exactphrase` &jscript=`mootools2` &parents=`24`!]

            What is your syntax Error ? Have you modified some code ?
              • 5811
              • 1,717 Posts
              Apologies. Open the js script and replace var _base=’assets/snippets/ajaxSearch191/’; by var _base=’assets/snippets/ajaxSearch/’;

              As I use several AS version, all the js are version dependant.
              • no,

                just removed my previous modification in the php

                function doSearch($searchString, $advSearch, $cfg, $bsf, $fClause) {
                global $modx;
                $advSearch = "exactphrase";

                wich works fine for my problem, and put your new js file in place…

                i just re-modified the php,

                maybe youve got an instant messaging or something like ichat / icq if you want to test it will be easier…

                  made with MODx => France Douglas || Vintage Weekender
                • smiley OK !!!!

                  now it works fine with you js.patch and after the base path modification

                  bravo et merci !
                    made with MODx => France Douglas || Vintage Weekender
                    • 5811
                    • 1,717 Posts
                    Issue registered as AJAXSEARCH-75 : exactphrase doesn’t work when the value is passed thru snippet call

                    To fix this issue:

                    1/ in classes/ajaxSearchConfig.class.php replace the code line #166
                                if ($key != 'advSearch' && $key != 'subSearch' && $value != $this->dcfg[$key]) $ucfg[$key] = $this->cfg[$key];
                                if ($key != 'subSearch' && $value != $this->dcfg[$key]) $ucfg[$key] = $this->cfg[$key];

                    2/ download the 3 attached js files - remove the .txt extension of these files

                    3/ drop the renamed files in the js/ajaxSearch1 folder. They should overwrite the pre-existing js files.
                      • 9930
                      • 23 Posts
                      I’m having this same issue on this site: www.octagoncycles.com.

                      The phrase I’m using is how to buy.

                      I’ve followed the instructions including modification of line 166 the ajaxSearchConfig.class.php file and replacing the js files.

                      The chunk being used for the snippet call is
                      [!AjaxSearch? &ajaxSearch=`0` &minChars=`2` &mbstring=`0` &showResults=`0` &landingPage=`78`!]

                      Any other things that I can try?

                      Thanks in advance.