We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16194
    • 103 Posts
    Well, is there anything special I need to do on updating from this rather old version?

    Any problems I should expect?

    Thanx for your help!!
      Impossible is nothing - with ModX
      • 5811
      • 1,717 Posts
      Take care the snippet name is now AjaxSearch not ajaxSearch .

      Give me your old snippet call, and i will give you how to update it.
        • 16194
        • 103 Posts
        Okay, here we go... smiley

        [!AjaxSearch? &extract=`1` &ajaxSearchType=`1` &ajaxMax=`5` &showMoreResults=`1`&moreResultsPage=`8` &language=`german`!]
          Impossible is nothing - with ModX
          • 5811
          • 1,717 Posts

          &ajaxSearchType=`1` is deprecated and useless. Othewise, your snippet call should run without any changes.

          Look at the Wiki documentation for more information about the meaning of AS 1.8.1 parameters.
            • 16194
            • 103 Posts
            I’m getting a parse error...

            Missing argument 2 for AjaxSearch::AjaxSearch(), called in /is/htdocs/***/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 337 and defined

            huh
              Impossible is nothing - with ModX
              • 5811
              • 1,717 Posts
              Could you post your snippet calls and confirm that you have copy/paste the content of the ajaxSearch/snippet.ajaxsearch.txt as a new release of the AjaxSearch snippet ?
                • 16194
                • 103 Posts
                BTW: I’m working with 0.9.6.1 (must test the installed SMF Bridge before updating sad )

                I reduced the Snippet call to [!ajaxSearch!] for testing purposes. I copied the appropiate snippet.ajaxsearch.php.
                  Impossible is nothing - with ModX
                  • 5811
                  • 1,717 Posts
                  The parse error you got is due to:

                  Error: Missing argument 2 for AjaxSearch::AjaxSearch(),
                  File: /www/assets/snippets/SearchAjax/classes/ajaxSearch.class.inc.php
                  Line: 99
                  Line 99 source: function AjaxSearch($version,$cfg,$dcfg) {

                  which means that the content of the AjaxSearch snippet template didn’t call the class AjaxSearch with the correct arguments.

                  Could you check that:
                  1/ you call AjaxSearch with the correct syntax. The version 1.5 was named ajaxSearch, the release 1.8.2 AjaxSearch.

                  2/ the AS_PATH is correctly defined (see line 66) : define(’AS_SPATH’, ’assets/snippets/ajaxSearch/’);
                  This constant define which class is called (see 397)
                  include_once AS_PATH."classes/ajaxSearch.class.inc.php";

                  3/ the content of the snippet AjaxSearch, call the class with the correct syntax (see line 400):
                  $as = new ajaxSearch(AS_VERSION,$cfg,$dcfg);