We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12896
    • 12 Posts
    Hello,

    we can’t get the template variable placeholders working with AjaxSearch 1.8.0. in non-ajax mode at the results page. They’re just outputting blanks. Using the default ajax mode with &tvPhx=`tv:displayTV`, these placeholders seem to be working fine.

    Here’s the non-ajax snippet call at the result page:

    [!ajaxSearch? &grabMax=`5` &ajaxSearch=`0` &tplResult=`SearchResultTemplate` &tvPhx=`tv:displayTV` &language=`finnish-utf8` &AS_showResults=`1` &AS_showForm=`0`!]
    


    And here’s a test clip from the SearchResultTemplate chunk used above, using two tvs, EventTitle (text) and EventContent (richtext):

    <div class="[+as.resultClass+]">
      <a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.EventTitle+]">[+as.EventTitle+]</a>
       <div>[+as.EventContent+]</div>
    </div>
    


    The non-ajax tests for 1.8.0 at AjaxSearch documentation site do not contain tvPhx-test for non-ajax calls. Is this even implemented with non-ajax calls?

    Has anyone else had a problem with this?

      • 5811
      • 1,717 Posts
      Hi Inertica,

      You are absolutely right. &tvPhx doesn’t run with the non-ajax mode tongue

      And It can’t because I have forgotten one important code line grin
      So to fix-it add the two following code lines :
          // Initialize tvPhx
          $this->initTvPhx();
      before the line 274 in the file classes/ajaxSearch.inc.php (checkParams function)

      Sorry for the inconvenience. I haven’t cover all the tests with the non-ajax mode and It could exist some other bugs with this mode.

      I have tested the correction and now all seems ok.

      [EDIT: Issue registered as ADDON-20]
        • 12896
        • 12 Posts
        Thank you coroico,

        now it’s working just like it should. No further problems detected with the non-ajax mode, will report if something comes up smiley