We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    I have an AjaxSearch set up on a site, with a search form that uses this code:

    [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`70`&AS_showResults=`0`!]

    The search results landing page then uses this code to list the results:

    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &tplResults=`{{resultsholder}}` &tplResult=`{{resultholder}}` !]

    The strange problem is that when I click on any of the search result links, although it jumps to the appropriate page, a ’>’ character appears right at the very start of the content. Looking at the generated page source code, it’s directly after <body>, so we have <body>> instead.

    I’ve checked the page content and templates / chunks and can’t find this extra character / typo anywhere!

    Anyone have any ideas?
      • 26931
      • 2,314 Posts
      Hi galahad5,

      i guess this bug here: http://modxcms.com/forums/index.php/topic,38930.0.html -> http://svn.modxcms.com/jira/browse/AJAXSEARCH-38

      In Search Highlighting:
      $body = explode("<body", $output); // break out the head

      But:
      $output = implode("<body>", $body);

      Result:
      <body>>

      Solution:
      $output = implode("<body", $body);
        • 10405
        • 288 Posts
        Thanks, where should this code be placed? I don’t see a corresponding line in the AjaxSearch snippet...
          • 26931
          • 2,314 Posts
          check Plugin -> "Search Highlighting"
            • 10405
            • 288 Posts
            Works great- many thanks smiley