We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24723
    • 19 Posts
    I’m attempting to set up an AjaxSearch on my site but I’m having some difficulty.

    Here is my call:
    [!AjaxSearch? &ajaxSearch=`1` &liveSearch=`1`&whereSearch=`tv:countries` &parents=`32,33,34,35` &depth=`1`!]

    Whenever I perform a search the default "spinning" image pops up but never goes away to show results. If I limit it to one of the resource parents it will actually return some results, but still takes a while—if I include all four parents it doesn’t return anything.

    Am I just trying to search through too many resources? Thanks for any input!

    I’m using Modx Evo, AjaxSearch 1.9.2, here is the debug info: http://pastebin.com/6XDHCSfy

    Also, if I hit "Return" after typing something in I get a PHP debug error:
    Error: mysql_free_result(): supplied argument is not a valid MySQL result resource
    Error type/ Nr.: Warning - 2
    File: .../assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php
    Line: 69
    Line 69 source: mysql_free_result($records);
      • 5811
      • 1,717 Posts
      [!AjaxSearch? &liveSearch=`1` &withTvs=`countries` &parents=`32,33,34,35`!]
      By default &ajaxSearch=`1`.
      To search in a tv uses withTvs parameter. If you would like avoid a search in content and other Tvs you could add &whereSearch=`content:null`

      By default &depth=`10`.
      Keep in mind that the search will occurs in children documents of 32,33,34,35.
      For a search inside these documents (and children) specify the father document.