We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32927
    • 45 Posts
    hello!
    I have some installation issues with AjaxSearch 1.7 undecided
    I am very new to all this so I didn’t upgrade my AjaxSearch 1.5 version but tried the parallel installations as it is described in the wiki (http://wiki.modxcms.com/index.php/AjaxSearch). I did it step by step, changed all the paths ftped my folder and copy-pasted into the new snippet (I called it AjaxSearchNew) the content of the snippet.ajaxSearch.php file. Then I called the snippet on a new document (using the minimal template) with the call [!AjaxSearchNew!], but all I could see in the preview was in the content area written : [[AjaxSearchNew]].
    Then I tried to call it by [!AjaxSearchNew? &ajaxSearch=`0`!] but then I saw just [[AjaxSearchNew? &ajaxSearch=`0`]] written!

    I can’t understand why this is not working.. (both in Firefox and in IE7)

    Ps1. I didn’t download the Css file proposed in wiki at first, cause I thought it was optional. I did later on but nothing happened.
    Ps2.Just because I don’t really know php: when I created the new snippet I placed the code that can be found in the snippet.ajaxSearch.php file, and made sure that the whole text was between <?php and ?>.
    Ps3. I also tried the preview making the document cacheable and non-cacheable, but nothing worked.

    And one last thing...
    I tried the call [!AjaxSearch!] which I guess calls the 1.5 AjaxSearch snippet and it works fine in FireFox but in IE7 turns the whole page into black. (Note: not the first time I preview it but if I refresh it once then it always gets black!) And here is another thing... in the Ie7 the only thing you can see is the ’’go’’ box of the search snippet, if you press it the page gets normal and everything works... (EDIT: not everything! The little x sigh which is used to close the search form is missing in IE7 browser) huh


    I am very confused! Please give me some advise.
      * Mathematics, rightly viewed, possesses not only truth, but supreme beauty
      • 5811
      • 1,717 Posts
      Hi Xrisanthi,

      Check your call snippet in your document. Use the upper right side HTML button to control that your call to AjaxSearchNew is correct. With no space or strange characters around [[ and the snippet name.
      If you get the call of the snippet in the output document means probably that it wasn’t evaluated as a snippet call.
        • 7231
        • 4,205 Posts
        and made sure that the whole text was between <?php and ?>
        Check to make sure you do not have double <?php ?> tags in your snippet. There should only be one set of tags:

        <?php 
        some code...
        ?>


        Not this:
        <?php 
        <?php 
        some code...
        ?>
        ?>


        @coroico: the ajaxsearch wiki is looking good, plenty of docs there since the last time I visited. Good job.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 3749
          • 24,544 Posts
          Quote from: xrisanthi at Jan 24, 2008, 03:46 AM

          hello!
          I have some installation issues with AjaxSearch 1.7 undecided
          I am very new to all this so I didn’t upgrade my AjaxSearch 1.5 version but tried the parallel installations as it is described in the wiki (http://wiki.modxcms.com/index.php/AjaxSearch). I did it step by step, changed all the paths ftped my folder and copy-pasted into the new snippet (I called it AjaxSearchNew) the content of the snippet.ajaxSearch.php file. Then I called the snippet on a new document (using the minimal template) with the call [!AjaxSearchNew!], but all I could see in the preview was in the content area written : [[AjaxSearchNew]].
          Then I tried to call it by [!AjaxSearchNew? &ajaxSearch=`0`!] but then I saw just [[AjaxSearchNew? &ajaxSearch=`0`]] written!

          Let’s get the snippet call working first. Try cutting and pasting the non-working snippet call in your document into a post here. That way, we’ll be sure to see exactly what you have and can spot any subtle errors.

          Bob
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 32927
            • 45 Posts
            Quote from: coroico at Jan 24, 2008, 05:51 AM

            Hi Xrisanthi,

            Check your call snippet in your document. Use the upper right side HTML button to control that your call to AjaxSearchNew is correct. With no space or strange characters around [[ and the snippet name.
            If you get the call of the snippet in the output document means probably that it wasn’t evaluated as a snippet call.

            I tried this out and this came out in the Html editor
            <br />
            <p>
              [!Ditto?  &truncLen=`50`&trubcText=`Read more..`  &parents=`3` &commentsChunk=`summary` &tpl=`DittoTemplate` &paginate=`1`  &display=`2` &hideFolders=`0`  &dateFormat=`%A %e %B %G` &sortBy=`menuindex` &depth=`2`!]
            </p>
            <p>
             
            </p>
            <p align="center">
                        Showing <strong>[+start+]</strong> <strong>- [+stop+]</strong> of<strong> [+total+]</strong> Articles | Page<strong> [+currentPage+]</strong> of <strong>[+totalPages+]</strong> 
            </p>
            <div align="center">
            </div>
            <div align="center">
                        <strong>[+previous+]</strong> <strong>[+pages+] [+next+] </strong>
            </div>
            <p>
             
            </p>
            <p>
             
            </p>
            <p>
              [!AjaxSearchNew?!]
            </p>


            I guess I didn’t install the snippet right, but really can’t figure out why...Is there something else to do that is not already said in the Wiki?
              * Mathematics, rightly viewed, possesses not only truth, but supreme beauty
              • 32927
              • 45 Posts
              Ok I got AjaxSearch 1.7 working but now When I search something I get this message in the place where the results sould be:

              AjaxSearch: database_connection_charset is null. Check your config file

              and its still not working in the IE7. (the first time you see the page in IE7 everything seems to be like in FireFox (well I get the ’’AjaxSearch: database_connection_charset is null. Check your config file’’ message too both in FF and in IE7) but when I refresh in IE7 the whole page gets black.

              PS.Pleaaaaaaaase try it out in both IE7 and FF and give me any suggestions you may have. http://dalab.ee.duth.gr/~pg249/modx-0.9.6.1/index.php?id=10

              is there something I must add somewere (a script call or something) in order to make it not get black in IE7?
                * Mathematics, rightly viewed, possesses not only truth, but supreme beauty
                • 5811
                • 1,717 Posts
                Yes. See the wiki documentation. Message error chapter at the end of the document.
                  • 32927
                  • 45 Posts
                  Quote from: coroico at Jan 24, 2008, 12:35 PM

                  Yes. See the wiki documentation. Message error chapter at the end of the document.

                  I am trying to set the $database_connection_charset=’utf8’ (it was $database_connection_charset=’ ’) but I can’t because Ihave no persmission to write in this file. I get the following message in FileZilla ’’/home/pg249/public_html/modx-0.9.6.1/manager/includes/config.inc.php: open for write: permission denied’’
                    * Mathematics, rightly viewed, possesses not only truth, but supreme beauty
                    • 5811
                    • 1,717 Posts
                    Simply change ( if you have ISO-8859-1 pages and latin1 mysql database) :
                    $database_connection_charset = ’’;
                    by
                    $database_connection_charset = ’latin1’;
                    in your local manager/includes/config.inc.php file and then upload it on your remote server.

                    What is the character set of your database ? When you have created you database, you have choosen a character set.
                      • 32927
                      • 45 Posts
                      I can’t really say why this is happening but the AjaxSearch 1.7 seems to work great here http://dalab.ee.duth.gr/~pg249/modx-0.9.6.1/index.php?id=3
                      but not here
                      http://dalab.ee.duth.gr/~pg249/modx-0.9.6.1/index.php?id=10

                      though I make the same call in both cases
                      [!AjaxSearchNew!]
                      huh huh huh huh

                      I guess it’s got something to do with the template...I hope its not as unstable as it seems. (Note: suddenly the first link works in IE7 too!!!!)
                      Very confusing...
                        * Mathematics, rightly viewed, possesses not only truth, but supreme beauty