We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2297
    • 31 Posts
    On edit: I think I may have figured out what the problem was... in the readme.txt file, there is a space in the code where possibly there shouldn’t be one. This is under the section "Non-Ajax Mode Example Calls":

    [!AjaxSearch? &ajaxSearch=`0` &AS_landing= `25`!]
    In this example, search results will be displayed on document #25
    This document should contain a non-ajaxSearch snippet call like :
    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &grabMax=`10` &extract=`0`!]
    to display the results without the search form again
    And overrides the number of maximum results returned per page and removes search term highlighting.

    Taking out the space between &ASlanding= and the first backtick for the page number seems to sort the issue, as the proper URL is now being generated. smiley






    Hi there,

    I’m sure I am missing something very basic here, because (a) I have searched the forums and read the AjaxSearch docs without finding anything similar referenced, and (b) I only installed MODx for the first time a couple of days ago and am therefore a complete noob with this system.

    I am porting an existing site over to MODx, and I’d like to get rid of the free search that’s currently in use on the live site. I am trying to use AjaxSearch 1.8.1 with ModX version 0.9.6.3.

    I wish to use AjaxSearch in non-Ajax mode, with the search results in a new page. I created a search results page, which has a page ID of (48). The results page is published but not listed in the menu, if this makes any difference (although I have tried it without the page being published.)

    The code in my template is this (copied right out of the example in the readme file, except for the change in landing page number):
    [!AjaxSearch? &ajaxSearch=`0` &AS_landing= `48`!]


    and the code in my results page (ID (48) is this (again copied out of the readme file):
    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &grabMax=`10` &extract=`0`!]


    However, when I execute a search, I get a 404 for the landing page, because the URL that is loaded is:
    http://www.arlawrence.aspendew.com/[~48`~]


    Shouldn’t it be calling this instead? (But I don’t know how to get it to do so?)
    http://www.arlawrence.aspendew.com/index.php?id=48


    Any help would be greatly appreciated - thanks! smiley




      • 5811
      • 1,717 Posts
      Apologize for the error in the documentation. This will be corrected with the release 1.8.2.
        • 2297
        • 31 Posts

        Thanks, coroico - but it wasn’t a complaint, so please don’t apologise! smiley

        I only came back to put the explanation in my post on the off chance that someone else may have the same issue someday. (But as I said, I haven’t seen anyone else mentioning about it as far as I can find - so I will put it down to my not knowing the syntax; else I probably would have spotted it straightaway.) It’s obvious from reading the forum that you put a lot of time and effort into all this - thank you! smiley