Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lars F Hansen 9 posts 29 karma points
    Jan 18, 2011 @ 17:31
    Lars F Hansen
    0

    XSLTSearch 3.0 & no search results

    I'm running Umbraco 4.5.2 and installed XSLTSearch 3.0 on a site (I'm using the new xml schema). I added the XSLTSearch macro to a page with the proper parameters (search fields, -1 as source etc). I also added a form with action="?" as specified in the pdf documentation. There are no other forms on the page.

    Whatever i try to search for returns zero results (it does return "no matches were found for..." so it's not a no submit issue).

    I also tried creating new articles to check if it was a case of data older then the xsltsearch install not being searched or the likes... that did not help either. Neither did a republish of the entire site.

    What did i miss out on? Must be something but the documentation doesn't mention any further steps as far as i can tell.

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 18, 2011 @ 21:10
    Jan Skovgaard
    0

    Hi Lars

    Could you perhaps post a screendump of your settings? I would really like to see them as there might be something wrong there. I would also like to see the HTML for your search form.

    Have you specified the fields in, which XSLT search should be allowed to look in?

    After you installation did you try to republish the entire site and update the XML cache?

    /Jan

  • Lars F Hansen 9 posts 29 karma points
    Jan 19, 2011 @ 12:07
    Lars F Hansen
    0

    Yes I've tried to republish the entire site several times after the installation.

    The macro settings are:

    <div umb_showstats="0" umb_showordinals="1" umb_previewfields="Tittel, Innhold" umb_searchfields="Tittel,\r\nInnhold, Innhold" umb_resultsperpage="10" umb_showscores="0" umb_macroalias="XSLTsearch" umb_showpagerange="0" umb_searchboxlocation="TOP" umb_previewtype="CONTEXT" umb_previewchars="250" umb_source="-1" ismacro="true" umbversionid="75aa3ebf-5b3b-4d2a-9318-2c02bfb23979" umbpageid="1071" onresizestart="return false;" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span>No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>

    For some reason the 2nd value in the searchfields get \r\n added. I tried to just use one field in case the \r\n messed up things but it didn't do any difference.

    The html code:

    <form action="?">
    <div id="xsltsearch"><div class="xsltsearch_form"><input name="search" type="text" class="input" value="a" /> <input type="submit" class="submit" value="Search"/></div><p id="xsltsearch_summary">No matches were found for <strong>a</strong></p><div id="xsltsearch_results"> </div></div>  
    </form>

    Was this the information you were looking for?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 19, 2011 @ 12:52
    Jan Skovgaard
    0

    Hi Lars

    Yes the \r\n stuff is an old bug, which should be fixed with Umbraco 4.6 - So I guess you're using an older version of Umbrac.

    Yes a part of it was.

    I'm wondering why you're using a macro for the settings? (maybe it's something with v3 that I'm not aware of). But usually I write the settings in a template, which is asociated with a search document type.

    Maybe it's because of the \r\n bug that it's not showing anything. It should be possible for you to solve it using umbraco.library:Replace(/macro/Tittel,'\r\n','') around the macro value and replace it with nothing.

    Does this work for you?

    /Jan

  • Lars F Hansen 9 posts 29 karma points
    Jan 19, 2011 @ 16:45
    Lars F Hansen
    0

    I found the problem. The field names were without capital letters and the field description was with. Managed to miss that somehow.

    Also noticed that if i had my innhold field last in the preview field list it wouldn't generate preview from that field. If i moved it first it worked just fine. Is there some sort of max limit to preview fields?

    Thanks for pointing me in the right direction so i actually noticed the capital letter mistake :)

Please Sign in or register to post replies

Write your reply to:

Draft