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

    Bit of frustration here having just upgraded from 0.9.5 to 0.9.6.3. The landing page displays with no results and the rolldown ajax part doesn’t function. Looking at ajaxSearch_log.txt I can see everything seems to be ok and I also get search results.

    I’m more interested in getting the rolldown working (the landing page has never worked). I poked around a bit in firebug and I found that the doSearch() javascript function never gets called when the AjaxSearch form is submitted. Its as if the function doesn’t get registered for the onsubmit event.

    Heres the site: http://www.ostergruppen.se/cms

    This is how I’ve called the snippet:
    [!AjaxSearch? &AS_landing=`8` &ajaxSearch=`1` &debug=`3`!]


    Some debug info:
    [8-Jan-09 01:16:50]  AjaxSearch 1.8.1 - Php5.2.6 - MySql 5.0.67
    
    [8-Jan-09 01:16:50]  AjaxSearch - User configuration - Before parameter checking : Array
    (
        [config] => default
        [version] => 1.8.1
        [debug] => 3
        [language] => english
        [ajaxSearch] => 1
        [advSearch] => oneword
        [whereSearch] => content|tv
        [subSearch] => 5,1
        [withTvs] => 
        [order] => publishedon,pagetitle
        [rank] => pagetitle:100,extract
        [minChars] => 3
        [AS_showForm] => 1
        [resultsPage] => 0
        [grabMax] => 10
        [extract] => 1:content,description,introtext,tv_content
        [extractLength] => 200
        [extractEllips] => ...
        [extractSeparator] => <br />
        [formatDate] => d/m/y : H:i:s
        [highlightResult] => 1
        [pageLinkSeparator] =>  | 
        [AS_landing] => 8
        [AS_showResults] => 1
        [idType] => parents
        [parents] => 
        [documents] => 
        [depth] => 10
        [hideMenu] => 2
        [hideLink] => 1
        [filter] => 
        [tplLayout] => @FILE:assets/snippets/ajaxSearch/templates/layout.tpl.html
        [tplResults] => @FILE:assets/snippets/ajaxSearch/templates/results.tpl.html
        [tplResult] => @FILE:assets/snippets/ajaxSearch/templates/result.tpl.html
        [tplPaging] => @FILE:assets/snippets/ajaxSearch/templates/paging.tpl.html
        [stripInput] => defaultStripInput
        [stripOutput] => defaultStripOutput
        [searchWordList] => 
        [breadcrumbs] => 0
        [tvPhx] => 0
        [clearDefault] => 0
        [jsClearDefault] => assets/snippets/ajaxSearch/js/clearDefault.js
        [ajaxSearchType] => 0
        [ajaxMax] => 6
        [showMoreResults] => 0
        [moreResultsPage] => 0
        [opacity] => 1
        [tplAjaxResults] => 
        [tplAjaxResult] => 
        [jscript] => mootools
        [addJscript] => 1
        [jsMooTools] => manager/media/script/mootools/mootools.js
        [jsJquery] => assets/snippets/ajaxSearch/js/jQuery/jquery.js
    )
    



    Any help would be appreciated.
    Thanks
      • 30625
      • 19 Posts
      same problem here,

      but with chrome and ff no problem, with ie problem.

        no mail. no icq, no aim, no msn, no yim, no sms, no phone, no fax, no telex, no satellite.... just yell smiley
        • 5811
        • 1,717 Posts
        @aicos

        I poked around a bit in firebug and I found that the doSearch() javascript function never gets called when the AjaxSearch form is submitted. Its as if the function doesn’t get registered for the onsubmit event.
        After the page loading of http://www.ostergruppen.se/cms you get 3 js errors. These are probably due to a conflict between mootools, scriptaculous and prototype.js



          • 5811
          • 1,717 Posts
          @triden

          same problem here, but with chrome and ff no problem, with ie problem.
          Could you precise the context of your issue, and the snippet calls (inputform calling page and landing page (if you use the non-ajax mode ou the more results option) ). Thanks.

            • 686
            • 24 Posts
            Thanks Coroico. I solved it by removing all the javascripts from the template:

                <script src="[(base_url)]manager/media/script/scriptaculous/prototype.js" type="text/javascript"></script>
                <script src="[(base_url)]manager/media/script/scriptaculous/scriptaculous.js" type="text/javascript"></script>
                <script type="text/javascript" src="[(base_url)]assets/templates/modxhost/moo.fx.js"></script>
                <script src="[(base_url)]assets/templates/modxhost/drop_down_menu.js" type="text/javascript"></script>
            


            These came from the MODxHost template. The drop-downs on the wayfinder seem to animate slower now, but thats a minor thing I guess.

            Thanks again.
              • 30625
              • 19 Posts
              Sorry took so long but i have only intranet. so difficult to show you.
              BUT i found out it is base

              for test i made this little html
              if i change
              <base href="http://intranet2008/" /> into
              <base href="http://www.modx.wangba.fr/"/>
              search work.
              Mootools on my system
              var MooTools={version:"1.11"}

              i am desperate
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
              	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <title>MODx Features</title>
              <link rel="stylesheet" type="text/css" href="http://www.modx.wangba.fr/assets/templates/ajaxSearch/css/search/relative.css" media="screen" />
              <base href="http://intranet2008/" />
              	<script type="text/javascript" src="manager/media/script/mootools/mootools.js"></script>
              	<script type="text/javascript" src="assets/snippets/ajaxSearch181/js/ajaxSearch.js"></script>
              <!-- start AjaxSearch header -->
              <script type="text/javascript">
              //<![CDATA[      
              config = 'default';
              as_version = '1.8.1';
              debug = 0;
              as_language = 'english-utf8';
              opacity = 1;
              advSearch = 'oneword';
              whereSearch = 'content|tv';
              subSearch = '5';
              withTvs = '';
              order = 'publishedon,pagetitle';
              rank = 'pagetitle:100,extract';
              minChars = 3;
              ajaxMax = 6;
              showMoreResults = 0;
              moreResultsPage = 0;
              extract = '1:content,description,introtext,tv_content';
              extractLength = 200;
              extractEllips = '...';
              extractSeparator = '<br />';
              formatDate = 'd/m/y : H:i:s';
              liveSearch = 0;
              docgrp = '';
              listIDs = '61';
              idType = 'parents';
              depth = 10;
              highlightResult = 1;
              hideMenu = 2;
              hideLink = 1;
              as_filter = '';
              tplAjaxResult = '';
              tplAjaxResults = '';
              stripInput = 'defaultStripInput';
              stripOutput = 'defaultStripOutput';
              breadcrumbs = '0';
              tvPhx = '0';
              
              //]]>
              </script>
              </head>
              <body>
                    <div id="search"><!--search_terms-->
                    
                      <form id="ajaxSearch_form"  action="index.php?id=15" method="post">
                          <fieldset>
                              <input type="hidden" name="advSearch" value="oneword" />
                          <label for="ajaxSearch_input">
                            <input id="ajaxSearch_input" class="cleardefault" type="text" name="search" value="Zoek hier..." onfocus="this.value=(this.value=='Zoek hier...')? '' : this.value ;" />
                          </label>
                          <label for="ajaxSearch_submit">
                            <input id="ajaxSearch_submit" type="submit" name="sub" value="Zoek!" />
                          </label>
                          </fieldset>
                      </form>
              <div id="ajaxSearch_output"></div>
              </div>
              <!-- end wrapper -->
              </body>
              </html>


              Like i said it works wirh FF and Chrome but not IE 6 and 7
              The result is a one line box with no content.
              i think some css is failing but i can’t figure out why and what.
              i tried also the develepment toolbar of IE.

              finally search log
              [19-Jan-09 04:16:39]  AjaxSearch - User configuration - Before parameter checking : Array
              (
                  [config] => default
                  [version] => 1.8.1
                  [debug] => 3
                  [language] => nederlands
                  [ajaxSearch] => 1
                  [advSearch] => oneword
                  [whereSearch] => content|tv
                  [subSearch] => 5,1
                  [withTvs] => 
                  [order] => publishedon,pagetitle
                  [rank] => pagetitle:100,extract
                  [minChars] => 3
                  [AS_showForm] => 1
                  [resultsPage] => 0
                  [grabMax] => 10
                  [extract] => 1:content,description,introtext,tv_content
                  [extractLength] => 200
                  [extractEllips] => ...
                  [extractSeparator] => <br />
                  [formatDate] => d/m/y : H:i:s
                  [highlightResult] => 1
                  [pageLinkSeparator] =>  | 
                  [AS_landing] => 
                  [AS_showResults] => 1
                  [idType] => parents
                  [parents] => 
                  [documents] => 
                  [depth] => 10
                  [hideMenu] => 2
                  [hideLink] => 1
                  [filter] => 
                  [tplLayout] => @FILE:assets/snippets/ajaxSearch181/templates/layout.tpl.html
                  [tplResults] => @FILE:assets/snippets/ajaxSearch181/templates/results.tpl.html
                  [tplResult] => @FILE:assets/snippets/ajaxSearch181/templates/result.tpl.html
                  [tplPaging] => @FILE:assets/snippets/ajaxSearch181/templates/paging.tpl.html
                  [stripInput] => defaultStripInput
                  [stripOutput] => defaultStripOutput
                  [searchWordList] => 
                  [breadcrumbs] => 0
                  [tvPhx] => 0
                  [clearDefault] => 0
                  [jsClearDefault] => assets/snippets/ajaxSearch181/js/clearDefault.js
                  [ajaxSearchType] => 0
                  [ajaxMax] => 6
                  [showMoreResults] => 0
                  [moreResultsPage] => 0
                  [opacity] => 1
                  [tplAjaxResults] => 
                  [tplAjaxResult] => 
                  [jscript] => mootools
                  [addJscript] => 1
                  [jsMooTools] => manager/media/script/mootools/mootools.js
                  [jsJquery] => assets/snippets/ajaxSearch181/js/jQuery/jquery.js
              )
              
              [19-Jan-09 04:16:39]  AjaxSearch - tplResult template @FILE:assets/snippets/ajaxSearch181/templates/result.tpl.html : <div class="[+as.resultClass+]">
                <a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
              [+as.descriptionShow:is=`1`:then=`
                <span class="[+as.descriptionClass+]">[+as.description+]</span>
              `+]
              [+as.extractShow:is=`1`:then=`
                <div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
              `+]
              [+as.breadcrumbsShow:is=`1`:then=`
                <span class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</span>
              `+]
              </div>
              [19-Jan-09 04:16:39]  AjaxSearch - tplResults template@FILE:assets/snippets/ajaxSearch181/templates/results.tpl.html : [+as.noResults:is=`1`:then=`
                <div class="[+as.noResultClass+]">
                  [+as.noResultText+]
                </div>
              `:else=`
                <p class="ajaxSearch_resultsInfo">[+as.resultInfoText+]</p>
                [+as.paging+]
                [+as.listResults+]
                [+as.paging+]
              `+]
              [19-Jan-09 04:16:39]  AjaxSearch - tplResult template@FILE:assets/snippets/ajaxSearch181/templates/layout.tpl.html : [+as.showForm:is=`1`:then=`
              <form [+as.formId+] action="[+as.formAction+]" method="post">
                  <fieldset>
              		<input type="hidden" name="advSearch" value="[+as.advSearch+]" />
                  <label for="ajaxSearch_input">
                    <input id="ajaxSearch_input" class="cleardefault" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
                  </label>
                  <label for="ajaxSearch_submit">
                    <input id="ajaxSearch_submit" type="submit" name="sub" value="[+as.submitText+]" />
                  </label>
                  </fieldset>
              </form>
              `+]
              [+as.showIntro:is=`1`:then=`
              <p class="ajaxSearch_intro" id="ajaxSearch_intro">[+as.introMessage+]</p>
              `+]
              [+as.showResults:is=`1`:then=`
              [+as.results+]
              `+]
              


              for reference here logfile using FF
              i realy hope someone can help me
              [19-Jan-09 04:09:38]  AjaxSearch - User configuration - Before parameter checking : Array
              (
                  [version] => 1.8.1
                  [debug] => 3
                  [config] => default
                  [language] => nederlands
                  [ajaxSearch] => 1
                  [advSearch] => oneword
                  [subSearch] => 
                  [whereSearch] => content|tv
                  [withTvs] => 
                  [order] => publishedon,pagetitle
                  [rank] => pagetitle:100,extract
                  [minChars] => 3
                  [ajaxMax] => 6
                  [showMoreResults] => 0
                  [moreResultsPage] => 0
                  [extract] => 1:content,description,introtext,tv_content
                  [extractLength] => 200
                  [extractEllips] => ...
                  [extractSeparator] => <br />
                  [formatDate] => d/m/y : H:i:s
                  [docgrp] => 7,3,6,4,5,1
                  [listIDs] => 
                  [idType] => parents
                  [depth] => 10
                  [highlightResult] => 1
                  [hideMenu] => 2
                  [hideLink] => 1
                  [filter] => 
                  [tplAjaxResults] => 
                  [tplAjaxResult] => 
                  [stripInput] => defaultStripInput
                  [stripOutput] => defaultStripOutput
                  [breadcrumbs] => 0
                  [tvPhx] => 0
              )
              
              [19-Jan-09 04:09:38]  AjaxSearch - tplResult template @FILE:assets/snippets/ajaxSearch181/templates/ajaxResult.tpl.html : <div class="[+as.resultClass+]">
                <a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
              [+as.descriptionShow:is=`1`:then=`
                <span class="[+as.descriptionClass+]">[+as.description+]</span>
              `+]
              [+as.extractShow:is=`1`:then=`
                <div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
              `+]
              [+as.breadcrumbsShow:is=`1`:then=`
                <span class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</span>
              `+]
              </div>
              [19-Jan-09 04:09:38]  AjaxSearch - tplResults template@FILE:assets/snippets/ajaxSearch181/templates/ajaxResults.tpl.html : [+as.showInfo:is=`1`:then=`
                <p class="ajaxSearch_resultsInfo">[+as.resultInfoText+]</p>
              `+]
              [+as.noResults:is=`1`:then=`
                <div class="[+as.noResultClass+]">
                  [+as.noResultText+]
                </div>
              `:else=`
              [+as.listResults+]
              `+]
              [+as.moreResults:is=`1`:then=`
                <div class="[+as.moreClass+]">
                  <a href="[+as.moreLink+]" title="[+as.moreTitle+]">[+as.moreText+]</a>
                </div>
              `+]
              [19-Jan-09 04:09:38]  AjaxSearchPopup - User configuration - Before doSearch : Array
              (
                  [version] => 1.8.1
                  [debug] => 3
                  [config] => default
                  [language] => nederlands
                  [ajaxSearch] => 1
                  [advSearch] => oneword
                  [subSearch] => 
                  [whereSearch] => content|tv
                  [withTvs] => 
                  [order] => publishedon,pagetitle
                  [rank] => pagetitle:100,extract
                  [minChars] => 3
                  [ajaxMax] => 6
                  [showMoreResults] => 0
                  [moreResultsPage] => 0
                  [extract] => 1:content,description,introtext,tv_content
                  [extractLength] => 200
                  [extractEllips] => ...
                  [extractSeparator] => <br />
                  [formatDate] => d/m/y : H:i:s
                  [docgrp] => 7,3,6,4,5,1
                  [listIDs] => 
                  [idType] => parents
                  [depth] => 10
                  [highlightResult] => 1
                  [hideMenu] => 2
                  [hideLink] => 1
                  [filter] => 
                  [tplAjaxResults] => 
                  [tplAjaxResult] => 
                  [stripInput] => defaultStripInput
                  [stripOutput] => defaultStripOutput
                  [breadcrumbs] => 0
                  [tvPhx] => 0
              )
              
              [19-Jan-09 04:09:38]  Search context main `modx_site_content` : Array
              (
                  [tb_name] => `modx_site_content`
                  [tb_alias] => sc
                  [id] => id
                  [searchable] => Array
                      (
                          [0] => pagetitle
                          [1] => longtitle
                          [2] => description
                          [3] => alias
                          [4] => introtext
                          [5] => menutitle
                          [6] => content
                      )
              
                  [displayed] => Array
                      (
                          [0] => pagetitle
                          [1] => longtitle
                          [2] => description
                          [3] => alias
                          [4] => introtext
                          [5] => menutitle
                          [6] => content
                      )
              
                  [date] => Array
                      (
                          [0] => publishedon
                      )
              
                  [filters] => Array
                      (
                          [0] => Array
                              (
                                  [field] => published
                                  [oper] => =
                                  [value] => 1
                              )
              
                          [1] => Array
                              (
                                  [field] => searchable
                                  [oper] => =
                                  [value] => 1
                              )
              
                          [2] => Array
                              (
                                  [field] => deleted
                                  [oper] => =
                                  [value] => 0
                              )
              
                          [3] => Array
                              (
                                  [field] => type
                                  [oper] => =
                                  [value] => 'document'
                              )
              
                      )
              
                  [jfilters] => Array
                      (
                          [0] => Array
                              (
                                  [tb_name] => `modx_document_groups`
                                  [tb_alias] => dg
                                  [main] => id
                                  [join] => document
                                  [field] => document_group
                                  [oper] => isnull or in
                                  [value] => 7,3,6,4,5,1
                              )
              
                      )
              
              )
              
              [19-Jan-09 04:09:38]  Search context joined `modx_site_tmplvar_contentvalues` : Array
              (
                  [tb_name] => `modx_site_tmplvar_contentvalues`
                  [tb_alias] => tv
                  [id] => id
                  [main] => id
                  [join] => contentid
                  [searchable] => Array
                      (
                          [0] => value
                      )
              
                  [displayed] => Array
                      (
                          [0] => value
                      )
              
                  [concat_separator] => , 
                  [phx] => name, value
                  [filters] => Array
                      (
                      )
              
                  [jfilters] => Array
                      (
                      )
              
              )
              
              [19-Jan-09 04:09:38]  Select :  
              SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.menutitle, sc.content, sc.publishedon, 
              GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id, 
              GROUP_CONCAT( DISTINCT ntv.value SEPARATOR ", " ) AS tv_value 
              FROM `modx_site_content` sc 
              LEFT JOIN `modx_document_groups` dg ON sc.id = dg.document 
              LEFT JOIN( 
              SELECT DISTINCT tv.id, tv.value, tv.contentid 
              FROM `modx_site_tmplvar_contentvalues` tv 
              WHERE (((tv.value LIKE '%Zoek%') OR (tv.value LIKE '%hier...%'))) ) AS ntv ON sc.id = ntv.contentid 
              WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.type='document') AND (ISNULL(dg.document_group) OR (dg.document_group IN (7,3,6,4,5,1)))) 
              GROUP BY sc.id 
              HAVING (((sc.pagetitle LIKE '%Zoek%') OR (sc.longtitle LIKE '%Zoek%') OR (sc.description LIKE '%Zoek%') OR (sc.alias LIKE '%Zoek%') OR (sc.introtext LIKE '%Zoek%') OR (sc.menutitle LIKE '%Zoek%') OR (sc.content LIKE '%Zoek%') OR (tv_value LIKE '%Zoek%')) OR ((sc.pagetitle LIKE '%hier...%') OR (sc.longtitle LIKE '%hier...%') OR (sc.description LIKE '%hier...%') OR (sc.alias LIKE '%hier...%') OR (sc.introtext LIKE '%hier...%') OR (sc.menutitle LIKE '%hier...%') OR (sc.content LIKE '%hier...%') OR (tv_value LIKE '%hier...%'))) 
              ORDER BY sc.publishedon,sc.pagetitle
              [19-Jan-09 04:09:38]  AjaxSearchPopup - Output result before ranking : Array
              (
                  [id] => 73
                  [pagetitle] => Kan geen rapporten opvragen
                  [longtitle] => 
                  [description] => 
                  [alias] => article-1227005830
                  [introtext] => 
                  [menutitle] => 
                  [content] => <p>Wanneer ik op rapporten en/of zoeken klik krijg ik enkel een wit scherm te zien. .</p>{{Comments}}
                  [publishedon] => 0
                  [tv_id] => 
                  [tv_value] => 
                  [extract] => ...Wanneer ik op rapporten en/of <span class="ajaxSearch_highlight ajaxSearch_highlight1">zoek</span>en klik krijg ik enkel een wit scherm te zien. .  ...
              )
                no mail. no icq, no aim, no msn, no yim, no sms, no phone, no fax, no telex, no satellite.... just yell smiley