We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    Next problem I am having with 1.6 (I downgraded) is that as soon as I try to use a language other than English (such as Spanish, Francais, Francais-utf8), the snippet doesn’t find any results. The ajax spinny thing appears along with the red cross and that’s it. However the text for the search box and the button do change to the selected language.

    I am using UTF8 for PHP and MySQL.

    Any ideas?

    Andy
      • 5811
      • 1,717 Posts
      Andy could you give me:

      1/ Your template snippet call
      2/ Your searchResults page snippet call

      Could you give (by mail if you want) your site address or at the minimum a copy of the html source code for the ajaxsearch script. Something like:
      <script type="text/javascript">
      		<!--
      		as_opacity = '0.9';
       		stripHtml = 1;
      		stripSnip = 1;
      		stripSnippets = 1;
      		useAllWords = 0;
      		searchStyle = 'partial';
      		minChars = 4;
      		maxResults = 5;
      		showMoreResults = 1;
      		moreResultsPage = 33;
      		as_language = 'francais-utf8';
      		extract = 1;
      		liveSearch = 0;
      		docgrp = '';
      		highlightResult = 1;
      		listIDs = '22,29,26,27,21,34,24,25,13,12,38,36,37,10,20,19,18,17,11,35';
      		-->
      	</script>


      Ublix has identified an issue on the 1.6.2 version which presents the same effects (memory crash). Look Ublix’s feedback at http://modxcms.com/forums/index.php/topic,5357.326.html" target="_blank" rel="nofollow">http://modxcms.com/forums/index.php/topic,5357.326.html

      If I start the search only with ... [!AjaxSearch!] ... I get an error after 4 seconds:

      Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 524288 bytes) in /var/www/MODx/www.domain.de/assets/snippets/AjaxSearch/includes/AjaxSearch.inc.php on line 325

      If I start the search with ... [!AjaxSearch? &depth=`8`!] ... the search does work.



      So try upgrade again to 1.6.2 (more robust than 1.6) and adds a &depth parameter to your call. And let me know if it is OK.
      I need some time to fix this issue. >:( Do you like Andy song ? wink
        • 727
        • 502 Posts
        Great!!!! Adding depth=`8` fixed the problem, plus it now works in both languages. smiley Thank you! I hope kylej adds your changes to the next release, otherwise perhaps you might want to consider renaming yours and adding it to the resources section so people like me can follow the updates. smiley I found 1.6 to be badly broken for anything other than English.

        I couldn’t get the video to load, but I did run the lyrics through Altavista’s translator for a laugh. Pretty funny:


        Hey, Andy? Hé, Andy! It is a girlfriend with me which said to me that you were called Andy! Andy... That made one moment that I am to you. Andy! Do Hé, you come at home? Or then one goes at home! Go, Andy, what, Oh say to me yes! Cabbage Andy Tell yes me Andy Chou Andy Dis me yes Chéri Cabbage Andy Tell yes me Andy Wo wo Chou Cherished Dis me yes Andy Cabbage Andy Tell him Andy Dis yes, tell him him Andy yes Would be nice This time The weather is breaking up Andy is concerned with it Andy attrappe Its Andy umbrella scrapes the corner of the eyebrow It is Andy Cape It is well him Cabbage Andy Tell me Andy Chou yes Cherished Dis me yes Oh, yes Does Andy hasten Andy is wary Andy is touched it wants? Andy throws a?il with the girl and smiles Andy is a polished boy Andy touches Andy is wary Andy hastens It returns at his place Andy always avoided the Andy troubles hastens is wary Chou!

        Andy
          • 5811
          • 1,717 Posts
          OK. As i am not sure to find the right song each time grin , i will try to fix this issue quickly.
            • 13825
            • 55 Posts
            Does anyone else have the problem where the highlight doesn’t work on the page with the article?

            so search results pages have the highlight...click through to the actual page and it doesn’t but the url does show ajax search with highlighting parameters
              • 7231
              • 4,205 Posts
              Do you have the Search Highlighting plugin activated?
                [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]
                • 4385
                • 372 Posts
                Problems with 1.6.2 ... Should this be a new thread? I realize it is not part of the repository yet. But I really need the ability to limit to a parent container.

                I want to have two searches one global and the other specific to a group of documents.

                I was getting an error in the sql and saw that I was getting two "AND"s in row for the query. I took out the "AND" from line 189:

                			$sql = substr_replace($sql, ') AND ', -4);


                in AjaxSearch.inc.php which allowed the search to work but gave me a mb_convert_encoding error.

                  DropboxUploader -- Upload files to a Dropbox account.
                  DIG -- Dynamic Image Generator
                  gus -- Google URL Shortener
                  makeQR -- Uses google chart api to make QR codes.
                  MODxTweeter -- Update your twitter status on publish.
                  • 727
                  • 502 Posts
                  It might help to post the exact snippet call you are using.

                  Andy
                    • 4385
                    • 372 Posts
                    Sorry Andy, I thought maybe it was a common problem.

                    This is how was calling it.
                    [!AjaxSearch? &parents=`4` !] I also tried [!AjaxSearch? !]

                    I since downgraded it because it was causing my global snippet search to fail as well.


                      DropboxUploader -- Upload files to a Dropbox account.
                      DIG -- Dynamic Image Generator
                      gus -- Google URL Shortener
                      makeQR -- Uses google chart api to make QR codes.
                      MODxTweeter -- Update your twitter status on publish.
                      • 5811
                      • 1,717 Posts
                      Hi bwente, thanks for these feedbacks.

                      - Could you give me your site page character set (UTF-8 ?) and your $database_connection_charset variable defined in your config file (utf8 ?)

                      - Could you give a copy of the html source code for the ajaxsearch script. Something like:

                      <script type="text/javascript">
                      <!--
                      as_opacity = ’0.9’;
                      stripHtml = 1;
                      stripSnip = 1;
                      stripSnippets = 1;
                      useAllWords = 0;
                      searchStyle = ’partial’;
                      minChars = 4;
                      maxResults = 5;
                      showMoreResults = 1;
                      moreResultsPage = 33;
                      as_language = ’francais-utf8’;
                      extract = 1;
                      liveSearch = 0;
                      docgrp = ’’;
                      highlightResult = 1;
                      listIDs = ’22,29,26,27,21,34,24,25,13,12,38,36,37,10,20,19,18,17,11,35’;
                      -->
                      </script>


                      I was getting an error in the sql and saw that I was getting two "AND"s in row for the query. I took out the "AND" from line 189: $sql = substr_replace($sql, ’) AND ’, -4);

                      In AjaxSearch.inc.php which allowed the search to work but gave me a mb_convert_encoding error.


                      - could you give me the mb_convert error message ? Thanks.

                      I confirm that I have noticed the issue regarding the "two "AND" in row for the query.

                      Give me these informations and i will work on your issue this evening (GMT+1 , French hour)

                      You can find an example of AjaxSearch 1.6.2 use on http://www.wangba.fr/accueil_livres_voyage.html

                      The Snippet call is :
                      [!AjaxSearch? &language=`francais-utf8` &AS_landing=`33`  &parents=`28` &moreResultsPage=`33` &extract=`1` &showMoreResults=`1`!]
                      where the document #28 is a folder which contains all the documents where the search occurs.

                      On my latop (XP) with the following call
                       [!AjaxSearch? &language=`francais-utf8` &parents=`28` !]
                      I get the same results (without the more results page obviously).

                      This discussion is closed to further replies. Keep calm and carry on.