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

    Anybody know how to fix this problem I’m having with the AjaxSearch snippet?

    We are managing two domains from one CMS, one Australian site and a UK site. We have a search form on both sites. I’ve attached a screenshot of what our site tree looks like.

    When I do a search, the results return with pages from both sites. Am I doing something wrong??? ’&parents’ is supposed to help me with this problem but it doesn’t seem to effect the results at all!! Hellp.

    Here’s my piece of code for the Australian website:
    [!AjaxSearch? &ajaxSearch=`0` &parents=`2,6,13,17` &AS_showResults=`0` &AS_landing=`27` &tplLayout=`AS_tplLayout`!] 


    Any help would be much appreciated
    Sarah

      • 5811
      • 1,717 Posts
      Which version of AjaxSearch do you use ? 1.8.4 ?
        • 26189
        • 7 Posts
        Hi coroico,

        1.8.3. Does that make a difference?

        sarah
          • 26189
          • 7 Posts
          Ohh..I just checked the wiki page for Ajax Search ( http://wiki.modxcms.com/index.php/AjaxSearch) and I thought 1.8.3 was the latest version. The text hasn’t been updated next to the "Current Release" link and it still says 1.8.3 but the link actually does lead to a download page for 1.8.4.

          Do you think it’ll help if I upgrade?

          Sarah
            • 5811
            • 1,717 Posts
            Here is the content of the release 1.8.4:
            The release 1.8.4
            
            ==== fix the followings issues:
            
            AJAXSEARCH-38 - body>> in Search Highlighting
            AJAXSEARCH-39 - Call to undefined method DocumentParser::getRecordCount()
            AJAXSEARCH-41 - Weird behavior versus dollar sign followed by 2 digits / \$\d{2} /
            AJAXSEARCH-44 - Parents with a container that doesn't contains any child documents
            AJAXSEARCH-46 - Injection of content when javascript is desactivate
            AJAXSEARCH-47 - Filter not working when parents or documents not initialized
            
            Previous versions :
             - 1.8.3a delivered the 12th of July 2009 (provided with MODx1.0.0)
            So yes, upgrade to 1.8.4 because your issue could be due to :
            AJAXSEARCH-44 - Parents with a container that doesn’t contains any child documents
            AJAXSEARCH-47 - Filter not working when parents or documents not initialized
              • 26189
              • 7 Posts
              Hi again..

              Thanks for that. I will try that and let you know how it goes.

              Sarah