Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Feb 03, 2010 @ 17:20
    Garrett Fisher
    0

    XSLT Search Macro Not Working

    Hi,

    I've placed the XSLT Search Macro (Percipient Studios) in my template.  I'm seeing the search field and the submit button fine.  However, when I submit it, instead of gettnig search results, I'm getting a Page Cannot Be Displayed error (HTTP 405 - Resource not allowed?).   Is there more TO implementing this?  For example, what template/page is it supposed to use to display the results?  I'm guessing XSLTsearch.xslt.  Either way, anyone have any advice on what I might be doing wrong here? 

    The Macro as it appears in the template:

    <umbraco:Macro source="1080" searchFields="pageName, text" previewFields="pageName, text" searchBoxLocation="BOTH" previewType="BEGINNING" resultsPerPage="5" previewChars="255" showPageRange="1" showOrdinals="0" showScores="0" showStats="1" Alias="XSLTsearch" runat="server"></umbraco:Macro>

    The form output is below:

    <form action="?" method="post" class="xsltsearch_form" xmlns:ps="urn:percipientstudios-com:xslt"><input name="search" type="text" class="input" value="" /> <input type="submit" value="Search" class="submit" /></form>

    Ideas?

    Thanks in advance,

    Garrett

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 03, 2010 @ 19:12
    Morten Bock
    1

    Sounds like you may not have your IIS setup correctly. Is it your own server or a shared host?

    Can you do a form POST anywhere on your website?

  • Garrett Fisher 341 posts 496 karma points
    Feb 03, 2010 @ 19:42
    Garrett Fisher
    0

    Yes. And I also followed a lot of specific IIS config walkthroughs on this problem, such as assigning Methods allowed on different filetypes, etc.

    My gut feeling is that I don't think I'd be having this problem if the POST was POINTING somewhere. What's with the...

    action="?"

    ...in the form tag??  I submit the form, and all I get is http://localhost/?, obviously (and the 405 error).  How does the search know how to display the results?  Do I need to create a Page in the Content tab for the results?  And assign it a special template?  And, if so, how do I plug this URL into the form action when the form is dynamically written to the page?  And do I place the XSLT Search Macro on the results page Too?  I am confused.  Really appreciate your help.

    //Garrett

  • Garrett Fisher 341 posts 496 karma points
    Feb 03, 2010 @ 19:50
    Garrett Fisher
    0

    That was it.

    I needed the form to Point somewhere. I created a Page and assigned it the "Search (only called with template alias)" template.

    But why isn't the form Action a paramater when you're inserting the Macro?  That's totally weird.  Now I have to take the HTML output of the form that the Macro spits out and then place THAT in my template, just so that I can specify a form action (eg. "/search-results.aspx").  Is this how this is supposed to be?  If so, then how are all of the parameters I set in the Macro going to be taken into account?

    //Garrett

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 03, 2010 @ 20:53
    Morten Bock
    0

    As far as I can tell, the xsltsearch macro does not create any form tag itself. At least not in the latest version. So you are in control of how the form tag should be rendered.

    If you have a global search box, then you would not need the macro to generate it.

  • Garrett Fisher 341 posts 496 karma points
    Feb 03, 2010 @ 21:02
    Garrett Fisher
    0

    Thanks for the reply.

    Ok so wait-- then the Macro goes on the RESULTS template then?  I am wondering how my params (eg. number of results per page, etc.) are going to be taken into account.  Look, when I add the XSLT Search macro to the template, it writes a search field and a submit button, that's it.

    //Garrett

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 03, 2010 @ 21:13
    Morten Bock
    0

    Yes, the macro goes on the results page. I only render more than the form when you do a search.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 03, 2010 @ 21:14
    Morten Bock
    0

    "It only renders" ... I dont render anything personally... :-)

  • Garrett Fisher 341 posts 496 karma points
    Feb 03, 2010 @ 21:45
    Garrett Fisher
    0

    Hahaha! That cracked me up.  I needed that ;)

    All right well your advice has totally fixed my problem.  I had been using CSW Search before which is why I thought the Macro was for the form and not the results.  It all makes good sense now.  Really appreciate your time.  I'll get this Umbraco thing down Yet!

    //Garrett

  • Md Johirul Islam 37 posts 57 karma points
    Oct 12, 2011 @ 18:53
    Md Johirul Islam
    0

    I install XSLT package every thing working fine. But the problem is when i type into the search input bos the result is show in my target page and near the inpute search box. Any one know why it happen. Please provide me the solution..... Thank you.......

Please Sign in or register to post replies

Write your reply to:

Draft