Copied to clipboard

Flag this post as spam?

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


  • Gus Deadman 45 posts 65 karma points
    May 08, 2012 @ 18:25
    Gus Deadman
    0

    XSLTsearch giving no results

    I've installed XSLT version 3.0.4 with Umbraco v 4.7.1.1 on XPPro using IIS 7.5 and .Net v4

    I am just beginning with this site and used the standard blogging templated site. I put the search box on the Welcome page and set the search to look at that page.

    The box appears, but when text is entered and the button pressed, the text returned says that there are no results to display even if I choose a common word like "and".   

    There is another post on the same subject that was cured by adjusting the macro alias and source tags but this is not applicable to my situation as mine are already the same as given that solution. I'm not sure what information I should provide. Here is my content tree and the macro as it came straight out of the box.

    Thanks

    Andrew

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

     
    <asp:Content ContentPlaceHolderId="RunwayMasterContentPlaceHolder" runat="server">
      <div id="content">
        <div id="contentHeader"> 
            <h2><umbraco:Item runat="server" field="pageName"/></h2>
        </div>

        <umbraco:Macro runat="server" Alias="XSLTsearch"
          macroAlias="XSLTsearch"
          source="-1"
          searchFields="@nodeName,metaKeywords,metaDescription,bodyText"
          previewFields="bodyText,metaDescription"
          previewType="beginning"
          searchBoxLocation="bottom"
          resultsPerPage="5"
          previewChars="255"
          showPageRange="0"
          showOrdinals="0"
          showScores="0"
          showStats="1">
        </umbraco:Macro>

      </div>
    </asp:Content>

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    May 08, 2012 @ 21:05
    Douglas Robar
    0

    You're right that all looks good though I don't think you mean the <form action=""> on the welcome page's search box is really set to the welcome page. You mean the search field is in a form with an action="/search.aspx", right? And, the search field is named 'search', right? 

    For a quick test, go to the /search.aspx page in the browser. When it first loads you'll get a search box generated by XSLTsearch itself. If you type 'runway' (without the quotes) and click the search button you should get two results. Using the search.aspx page directly will ensure the above issues of form action and search field name aren't an issue.

    Let us know what you find out.

    cheers,
    doug. 

  • Gus Deadman 45 posts 65 karma points
    May 09, 2012 @ 10:45
    Gus Deadman
    0

    Doug,

    Thanks for this, I'm not sure quite what your first paragraph means but to be accurate when I set the search up I set it to search all of the pages with the template "blog post" and it is only Welcome that uses that template so I was expecting it to only search the page the box is on.

     One thing I did notice was in the source code where the reference to the search box is placed, it looks like this;

    <divid="xsltsearch"><divclass="xsltsearch_form"><inputname="search" type="text" class="input" value="" /> Should "value" be nothing?

    BTW I went to http://localhost:47282/search.aspx and I get an error, I've copied some of it below.

    Thanks

    Andrew

     

    Server Error in '/' Application.


    Cannot find ContentPlaceHolder 'RunwayMasterContentPlaceHolder' in the master page '/umbraco/masterpages/default.master', verify content control's ContentPlaceHolderID attribute in the content page.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Cannot find ContentPlaceHolder 'RunwayMasterContentPlaceHolder' in the master page '/umbraco/masterpages/default.master', verify content control's ContentPlaceHolderID attribute in the content page.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [HttpException (0x80004005): Cannot find ContentPlaceHolder 'RunwayMasterContentPlaceHolder' in the master page '/umbraco/masterpages/default.master', verify content control's ContentPlaceHolderID attribute in the content page.]
       System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +931
       System.Web.UI.MasterPage.get_Master() +42
       System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +19
       System.Web.UI.Page.ApplyMasterPage() +135
       System.Web.UI.Page.PerformPreInit() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1069
    


  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    May 09, 2012 @ 11:05
    Douglas Robar
    0

    Hi, Gus,

    No problem with the value="", that's normal unless you've previously run a search and the prior search term will be pre-populated.

    The real issue is that you're using the XSLTsearch macro on the welcome template, which isn't how it works.

    You want to get the search.aspx page working first. This is the page that will display the search results... that's what the XSLTsearch macro does, it searches and display results. The macro also creates a search form so you can enter terms to search but that can be disabled if you provide your own (a search box in the site's banner for instance).

    Step one is to update the template for the search.aspx page to work with your site. You don't have Runway installed so you'll need to modify the master template and change the content plaecholder id to reflect your site's layout. That's what the error is telling you, that the XSLTsearch template is looking for an asp:ContentPlaceHolder with an ID="RunwayMasterContentPlaceHolder"... but your site doesn't have one, so it errors. 

    Once you have the search page working, you'll be able to search and see results from the search page.

    Step two is to change the search field on the welcome page (or in the banner if that's where it is) to send requests to the search.aspx page for the XSLTsearch macro that's on the search page's template to process and display the results. This is done by using <form action="/search.aspx"> and being sure the text box you're using to type the search term into has a name of "search". Then, when you type a search term into your welcome page it will be sent to the search.aspx page, which will do the searching and display the results.

    Hope that clarifies things.

    cheers,
    doug. 

  • Gus Deadman 45 posts 65 karma points
    May 09, 2012 @ 13:18
    Gus Deadman
    0

    Thanks for your swift reply, however though I have done a good deal of coding in the past I'm new to Umbraco so you may have to tell me how to do things as well as what has to be done.

    I now have a search.aspx page with a box on it but it will only search itself, though it does that quite successfully. However  I didn't understand Step 2 and so the search box on the welcome page doesn't work. Where would I put <form action="/search.aspx"> in the welcome page code? I tried putting it at various places in the macro div and now can't save the page without getting the crash detailed below even though I've returned the page to the original code.

    Thanks

    Andrew

    Method not found: 'Void Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Field)'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.MissingMethodException: Method not found: 'Void Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Field)'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [MissingMethodException: Method not found: 'Void Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Field)'.]
       UmbSearch2.Search.Indexer.AddNodeToIndex(CMSNode node, Hashtable fields, Boolean IsMediaItem) +0
       UmbSearch2.Search.Indexer.Index(Document node) +534
       UmbSearch2.EventHandlers.DocumentIndexer.Document_AfterPublish(Document sender, PublishEventArgs e) +35
       umbraco.cms.businesslogic.web.PublishEventHandler.Invoke(Document sender, PublishEventArgs e) +0
       umbraco.cms.businesslogic.web.Document.FireAfterPublish(PublishEventArgs e) +27
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +1520
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +236
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +46
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +113
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5296
    


  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    May 09, 2012 @ 14:27
    Douglas Robar
    0

    Hi Andrew,

    Oh dear, things haven't gone well have they? From the error I see you've also got UmbSearch installed, which is not at all related to XSLTsearch. You've also modified the XSLTsearch.xslt file which isn't necessary. If it won't save there's a fundamental problem somewhere that needs to be resolved before we can again get back to how to use XSLTsearch. At this point it seems there are a number of inter-related things that aren't quite right and are working against each other, complicating the situation.

    UmbSearch and Lucene are different technologies and not related to (or used by, or able to be used by) XSLTsearch.

    It might be easier to start over with a fresh installation of Umbraco and the blog site if you've not done much with it so far. Otherwise, it will be difficult for you (being new to Umbraco) to find the issue(s) and put things aright with the existing site.

    With a solid site, installing and configuring XSLTsearch should take less than 5 minutes. With the existing site and errors I'm really not in a postion to be able to help much.

     

    What do you think, can you start again or do you need to continue with the existing site?

    cheers,
    doug. 

  • Gus Deadman 45 posts 65 karma points
    May 09, 2012 @ 15:19
    Gus Deadman
    0

    I've been installing various search mechanisms in order to compare them but I'm not sure about the references to Lucene as I haven't installed it yet.

    I need to carry on with this installation, it took me days to install Umbraco, I did it about eight times and have only one working instance, I don't want to risk losing the only one I have.

    Thanks

    Andrew

     

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    May 09, 2012 @ 15:25
    Douglas Robar
    1

    I feel your pain. It shouldn't be anything like that difficult.

    If you only have the blog starter site and XSLTsearch I could install Umbraco and XSLTsearch locally and zip it and email it to you in about 10 minutes if there isn't much else needed on the site. You could then unzip into a new folder and use IIS or WebMatrix to run the site. 

    If that's interesting to you, contact me through my website at http://www.percipientstudios.com/about/contact.aspx and let me know your email address. The zip file would be about 10MB I would guess so be sure your email can handle that.

    cheers,
    doug. 

  • Rea Franco 11 posts 31 karma points
    Oct 10, 2012 @ 07:49
    Rea Franco
    0

    Hello.

    I am new to umbraco and I  haveinstalled XSLTsearch version 3.0.4 on umbraco 4.9. The installation is okay but whenever I type something on the search box it seems that it doesn't work. I have tried using the ./search.aspx but still it doesnt show anything. What could be the problem with this?

     

    thanks in advance,

    Rea :)

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Oct 10, 2012 @ 09:44
    Douglas Robar
    0

    Hi, Rea,

    Could you please post again as a new topic rather than re-using this one, which has already been answered? That helps keep things clear. Also, please provide more information about what does and doesn't work. When you visit the search.aspx page, does anything appear at all or is it just an empty page? 

    Thanks!

    cheers,
    doug. 

    <<EDIT>> Rea's question is now at http://our.umbraco.org/projects/website-utilities/xsltsearch/xsltsearch-bugs/35212-XSLTsearch-searchaspx-does'nt-show-any-result

Please Sign in or register to post replies

Write your reply to:

Draft