We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2819
    • 30 Posts
    @coroice .. You’re right..

    @sumodaz : perhaps you can share us the ajax error reports ?

    That way people might be able to help you through the upgrade process
    I ve had had ’errors’ before due to encoding (utf8_general_ci and utf8_unicode_ci ) , now that kind of errors are really really easy to fix .. in the 1.9.0 version you have to edit two php files

    @coroice I know my post wasn’t very precise, sorry for that.
    I will come back on this if have found out more details...
      • 37449
      • 57 Posts
      Sorry, my post was a bit of a "user" question!!

      OK, the error is:

      PHP error debug
        Error: 	Missing argument 1 for AjaxSearch::AjaxSearch(), called in D:\web\manager\includes\document.parser.class.inc.php(770) : eval()'d code on line 447 and defined	 
        Error type/ Nr.: 	Warning - 2	 
        File: 	D:\web\assets\snippets\ajaxSearch\classes\ajaxSearch.class.inc.php	 
        Line: 	98	 
        Line 98 source: 	function AjaxSearch($version,$cfg,$dcfg) { 
      



      This is the code in the document.parser.class.inc.php file
         	if ($js= $this->getRegisteredClientStartupScripts()) {
          		// change to just before closing </head>
          		// $this->documentContent = preg_replace("/(<head[^>]*>)/i", "\\1\n".$js, $this->documentContent);
          		$this->documentOutput= preg_replace("/(<\/head>)/i", $js . "\n\\1", $this->documentOutput);
          	}
      


      but line 447 is the 2nd comment line

      And this is the code at line 98 in the AjaxSearch.class.inc.php file
        function AjaxSearch($version,$cfg,$dcfg) {
          // set the AS snippet version
          $this->version = $version;
          // load configuration snippet options
          $this->cfg = $cfg;
          // load default configuration values
          $this->dcfg = $dcfg;
        }
      


      Also, Manager is still showing me as having 1.0.3 - but the install went OK....

      any help greatly appreciated laugh
        formerly sumodaz on here!
        • 5811
        • 1,717 Posts
        @Sumodaz

        I don’t know why but I think that your installation use the AjaxSearch 1.9.0 snippet file provided with MODX 1.0.4 in the manager but with the AjaxSearch 1.8.5 directory provided with MODx 1.0.3 huh

        1/ Clean your MODx cache manager, to be sure that you use the last AjaxSearch Snippet

        2/ If you still have the same error and want to stay on MODx 1.0.3. follow the instruction provided by Bartnelis

        What is your Php version ?
          • 37449
          • 57 Posts
          php = 5.2.13

          I cleaned the site cache and the Manager logs - is there anything else I should have cleaned/emptied?
          I got the same error on both my local installation AND live installation. All the snippets are un-modified from the original, default installation.

          I have restored everything back 1.0.3 for now while I play around. Thank goodness for back-ups and support on here laugh laugh
            formerly sumodaz on here!
            • 37449
            • 57 Posts
            Just tried this again...

            This time I deleted the AjaxSearch snippet and re-ran the installation. The new snippet is created but the same error ocurs.

              formerly sumodaz on here!
              • 37449
              • 57 Posts
              Well, third time lucky!!

              It seems I had an corrupted/incomplete download of 1.0.4 - just redownloaded and reran the installation and everything has gone perfectly!

              Many thanks to coroico and bartnelis for assisting laugh
                formerly sumodaz on here!
                • 34108
                • 66 Posts
                Hi, I’m having this exact same problem but unfortunately none of the fixes above have worked for me if one of you wonderful AjaxSearch guru’s is able to help me? Also thank you Coroico for AjaxSearch, it does have it’s quirks but I think it’s a fantastic out-of-the-box search engine and your work is very much appreciated smiley

                I have the exact same parse error, and I’ve done 3 fresh installations of the same site on empty cache and the AjaxSearch snippet deleted before I ran the install, but I’m still getting the error below.

                Tech specs - I am running a fresh install from the latest version of MODx Evolution 1.0.4 , and AjaxSearch is version 1.9.0. PHP version is 5.2.10.

                My chunk - [!AjaxSearch? &ajaxSearch=`0` &AS_showResults=`0` &AS_landing=`41`!] ...(but the same problem occurs with a simple [!AjaxSearch!] call.

                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource: 
                « PHP Parse Error » 
                  
                PHP error debug 
                  Error:  Missing argument 1 for AjaxSearch::AjaxSearch(), called in /home/walkerde/public_html/restricted/cullengas/website/manager/includes/document.parser.class.inc.php(770) : eval()'d code on line 447 and defined   
                  Error type/ Nr.:  Warning - 2   
                  File:  /home/walkerde/public_html/restricted/cullengas/website/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php   
                  Line:  98   
                  Line 98 source:  function AjaxSearch($version,$cfg,$dcfg) {    
                  
                Parser timing 
                  MySQL:  0.0050 s (4 Requests) 
                  PHP:  0.0321 s   
                  Total:  0.0371 s 
                


                A very big thank you in advance for any help or advice you can give me!

                Harmony
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Check the documentation in the ajaxSearch folder; the parameter names have been changed.
                  &showResults •
                  &landingPage
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 34108
                    • 66 Posts
                    Thanks for the quick response Susan smiley That didn’t fix the problem itself but did help me figure out what it was - somehow I’d managed to include some AjaxSearch version 1.8.5 files in my localhost version which of course then made it to the upload (*slaps forehead*). A complete delete and reinstall of just AjaxSearch and it’s now working fine.

                    Thanks again.
                      • 5811
                      • 1,717 Posts
                      If you need re-install AjaxSearch 1.9.0, I strongly recommand you to install the last release : 1.9.1. You can download it from the repository or from the ajaxSearch demo site

                      This release fix some issues of the ajaxSearch 1.9.0.
                      Regarding the changes for the parameter read this post or the file ajaxSearch/documentation/migration185to190.txt file.