We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    Hi vanMeter,

    Happy New Year to you and everybody on this forum.

    Forget "Overwrite the snippet code of AjaxSearch with the content of AjaxSearch.inc.php" The file AjaxSearch.inc.php should be replaced by the same file in the folder includes. I will change the previous post to avoid an another misunderstanding

    And in the zip file downloaded, the file snippet-ajaxSearch-tpl.php should replace the code of your snippet. Lines 499 to 504 have been changed to work with this fix.

    Don’t worry about images of my web site. As now, the issue is corrected, we could erase them.
      • 31290
      • 37 Posts
      Hmmm...I have uploaded the files from your ZIP, and have used the contents of snippet-ajaxSearch-tpl.php for the snippet code, and now I am running into a problem with the page not loading. It just shows a blank white page and the status bar says "Waiting for www.vanmeterindustrial.com..." Am I forgetting to do something?

      I have tried reinstalling this snippet a few times and continue to get the same problem. I even tried upgrading to 1.6 before installing your fix. Please let me know what I am doing wrong. Here is the page:

      http://www.vanmeterindustrial.com/index.php?q=100
        • 5811
        • 1,717 Posts
        VanMeter, on my own web site i have re-done the following steps :

        - download the 1.6.2e fix from the previous post

        - copy the code of the file snippet-ajaxSearch-tpl.php inside the snippet AjaxSearch under Modx

        - copy the file AjaxSearch.inc.php in the folder assets/snippets/AjaxSearch/includes

        - copy the file AjaxSearch.php in the folder assets/snippets/AjaxSearch

        and i have no blank page.
        You could see the results on my site and try a "card world" search.

        Have you done any other changes ?
          • 31290
          • 37 Posts
          I did each step in your previous post, and inbetween each step I checked to see if the page still worked. It worked fine after every step until I changed the snippet code and saved it. Then I refreshed the page and it is doing the same thing again, it takes about 2 minutes to load the page and when it’s done it is just a blank white page...Not sure what the problem is? I haven’t changed anything else...
            • 5811
            • 1,717 Posts
            Is there somebody who download this fix ? And have you the same kind of pbs ? Thanks for your answer.

            VanMeter, in your template, if you suppress the call to the snippet AjaxSearch, do you load your page ?

            As it can be due to an absence of a file could you then check that you have the following files in the following folders :

            under assets/snippets/AjaxSearch/ :

            - AjaxSearch.php
            - AjaxSearch.js

            under assets/snippets/AjaxSearch/includes/ :

            - templates.inc.php
            - AjaxSearch.inc.php

            under assets/snippets/AjaxSearch/lang/:

            - english-utf8.inc.php
              • 31290
              • 37 Posts
              Removing the Snippet call does suppress the problem. So the problem definitely lies in the snippet. I also have all of the files that you listed in the assets/snippets/AjaxSearch/ folder as well as the /includes/ and /lang/ folders.

              I have narrowed down the problem to the snippet code. Once this is changed from 1.6 to the 1.6.2e fix that you uploaded, this is when I start running into problems. I even uploaded the new JS and PHP files and the page still loads fine (the search doesn’t work properly, but at least the page loads).

              Like I said, I am fairly sure the problem lies in the snippet code. Would you mind copying the source from your snippet from your site, since it works perfectly, and then send me that updated source.

              We will go from there. I can’t think of anything else to do...I would also like to hear from someone else who has tried this update and if it worked for them.
                • 5811
                • 1,717 Posts
                As I am not sure that it’s easy for everybody to follow the fixes of the version 1.6.2, find enclosed a 16.3 version which enclose all the fix and a security patch. See below the following posts.

                Regarding the fixe 1.6.e (the strip_tag runs only for the first searchword in a multi-search), this fix works on my site but not for VanMeter himself huh , so thanks if somebody could test it again.

                Here are the changes (no new features sad ) for this version :

                - Cmku’s feedback :
                http://modxcms.com/forums/index.php/topic,20128.msg125501.html#msg125501
                If your database charset and your pages are all in UTF-8, normally you do not
                use the phb.mbstring extension, but ...

                Corrected with 1.6.2b fix

                - Bwente’s feedback :
                http://modxcms.com/forums/index.php/topic,5357.msg128813.html#msg128813
                My $database_connection_charset variable was not set.
                The interesting thing is that it was not set on my home machine either and it worked.

                Corrected with 1.6.2c fix

                - Transeffect’s feedback :
                http://modxcms.com/forums/index.php/topic,5357.msg128938.html#msg128938
                I just noticed that it fails if I do a search while logged in as a web user.
                Not logged in, everything works, but when logged in as any web user, I get the
                following javascript error: "The URI to be decoded is not a valid encoding"

                Corrected with 1.6.2d

                - Jean-Marie feedback
                http://modxcms.com/forums/index.php/topic,19755.msg130245.html#msg130245
                Double initialisation of javascript variables

                Corrected with MODX 0.9.6.1
                http://modxcms.com/forums/index.php/topic,21109.msg130413.html#msg130413

                - VanMeter’s feedback :
                http://modxcms.com/forums/index.php/topic,21047.msg131003.html#msg131003
                I searched for card and then for "world phonecards" and it showed results with
                formatting, then when I search for just "phonecards" it didn’t show the formatting...

                Corrected with 1.6.2e

                - Security patch :
                http://modxcms.com/forums/index.php/topic,5357.msg131495.html#msg131495


                  • 30765
                  • 66 Posts
                  Quote from: coroico at Jan 02, 2008, 07:50 PM

                  As I am not sure that it’s easy for everybody to follow the fixes of the version 1.6.2, find enclosed a 16.3 version which enclose all the fix and a security patch.

                  Regarding the fixe 1.6.e (the strip_tag runs only for the first searchword in a multi-search), this fix works on my site but not for VanMeter himself huh , so thanks if somebody could test it again.

                  I’ve tried it out, but I’m getting a timeout.
                  Fatal error: Maximum execution time of 30 seconds exceeded in ... assets/snippets/AjaxSearch/includes/AjaxSearch.inc.php on line 328

                  Seems to be stuck while looping over the children of docIDs. I’m not using it in Ajax mode and the search results page has a pretty simple call:
                  [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`!]

                  There are probably around 1,200 documents in the database.

                  This hasn’t happened in 1.6.2, and the just-released security fix also works fine.

                  Cheers
                  Matt
                    • 5811
                    • 1,717 Posts
                    Ok, thanks Tuatara for this feedback.
                    As this version seems not enougth robust for a large volume of documents, I prefer come back and erase the download of this version.
                    Even if your issue seems not linked with the VanMeter issue, I need to do some tests on a larger volume of database. Sorry for the inconvenience and thanks again for your tests.
                      • 31290
                      • 37 Posts
                      I only have roughly 100 documents on my site. I just thought I would post this as an FYI. I’m not sure that my problem is exactly the same as tuatara’s but it is similar. It seems my browser has run into an error in the script, and basically times out before loading the page (leaving a completely white page).

                      Coroico - When you try going to my search page does it give you the same result?

                      This is my search page: http://www.vanmeterindustrial.com/index.php?q=100