+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / SearchResults widget issue

SearchResults widget issue

7 posts, 0 answered
  1. Elsane
    Elsane avatar
    30 posts
    Registered:
    06 Jan 2012
    23 Nov 2012
    Link to this post
    Hello,

    We had a Sitefinity 4.4 site, all was working fine. We migrated to Sitefinity 5.1 and had an issue since : an error with the SearchResults control "Unknown server tag 'sfSearch:SearchBox'".

    After a few researchs it's seems to be an assembly error in the widget but we cannot fix it as it seems the page "design->widget template" has an error while loading the content (the call to /Sitefinity/Services/ControlTemplates/ControlTemplateService.svc answer 'aborted' for unknown reason).

    The obvious solution seemed to be to replace the widget with the one provided with the SDK and replace the type in admninstration->settings->advanced->toolboxes->PageControls->Section->Search->SearchResult with the path of the control.

    And... it worked ! At least we don't have any error anymore. But we don't have any result either, but a strange string "{0} search results for {1}" .  We updated the search index just in case without success.

    Any idea to fix this ?

    Thank you.
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    06 Dec 2016
    28 Nov 2012
    Link to this post
    Hi,

    There is a problem with the search results widget since in Sitefinity 5 the assembly where the search implementation resides was changed In the second screenshot you have provided you can see the first line in the error you get  Assembly="Telerik.Sitefinity" which is not correct. It should be Assembly="
    Telerik.Sitefinity.Search.Impl". To fix the problem go to Design->Widget Templates and find all search related templates. If there are more than two templates delete two of them preferably those who have
    Assembly="Telerik.Sitefinity" as referenced assembly in their template.

    The first error is caused because of having more than one templates for search results with the problematic assembly.

    Second make sure the templates for search results have markup like:
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sitefinity" %>
    <%@ Register Assembly="Telerik.Sitefinity.Search.Impl" Namespace="Telerik.Sitefinity.Services.Search.Web.UI.Public" TagPrefix="sfSearch" %>
      
      
    <sfSearch:SearchBox ID="topSearchBox" runat="server" />
      
    <sitefinity:SitefinityLabel id="resultsStats" runat="server" WrapperTagName="p" CssClass="sfsearchResultStatistics" Text="<%$Resources:SearchResources, SearchResultsStatusMessage %>" />
    <asp:Repeater ID="resultsList" runat="server">
    <HeaderTemplate>
    <ol class="sfsearchResultsWrp sfsearchReultTitlesOnly">
    </HeaderTemplate>
    <ItemTemplate>
    <li class="sfsearchResultTitle"><a href='<%# Eval("Link")%>'><%# Eval("Title") %></a></li>
    </ItemTemplate>
    <FooterTemplate>
    </ol>
    </FooterTemplate>
    </asp:Repeater>
    <sitefinity:Pager ID="pager" runat="server" />
      
    <sfSearch:SearchBox ID="bottomSearchBox" runat="server" />
    and for the template for Title, URL, Excerpt:
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sitefinity" %>
    <%@ Register Assembly="Telerik.Sitefinity.Search.Impl" Namespace="Telerik.Sitefinity.Services.Search.Web.UI.Public" TagPrefix="sfSearch" %>
      
    <sfSearch:SearchBox ID="topSearchBox" runat="server" />
      
    <sitefinity:SitefinityLabel id="resultsStats" runat="server" WrapperTagName="p" CssClass="sfsearchResultStatistics" Text="<%$Resources:SearchResources, SearchResultsStatusMessage %>" />
      
    <asp:Repeater ID="resultsList" runat="server">
    <HeaderTemplate>
    <dl class="sfsearchResultsWrp sfsearchReultTitleSnippetUrl">
    </HeaderTemplate>
    <ItemTemplate>
    <dt class="sfsearchResultTitle"><a runat="server" href='<%# Eval("Link")%>'><%# Eval("Title") %></a></dt>
    <dd class="sfsearchResultSnippet"><%# Eval("Summary")%></dd>
    <dd class="sfsearchResultUrl"><a runat="server" href='<%# Eval("Link")%>'><%# Eval("Link")%></a></dd>
    <dd class="sfsearchResultHighLighter"><%# Eval("HighLighterResult")%></dd>
    </ItemTemplate>
    <FooterTemplate>
    </dl>
    </FooterTemplate>
    </asp:Repeater>
    <sitefinity:Pager ID="pager" runat="server" />
    <sfSearch:SearchBox ID="bottomSearchBox" runat="server" />


    Kind regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    28 Nov 2012 in reply to Stanislav Velikov
    Link to this post
    @Elsane

    I have a 4.4 site that I want to take up to 5.3 in December.

    Can you tell me what intermediate updates you did run. I don't assume you went from 4.4  to 5.1 streight.

    Any problems besids the search you encountered?

    Markus
  4. John
    John avatar
    14 posts
    Registered:
    23 Aug 2012
    29 May 2013
    Link to this post
    In my search result page, the href='<%# Eval("Link")%>' is displayed as IP address. Does anybody know what is wrong with this? Thanks in advance! How can I solve this problem? We are using 5.1 version and the web site is on live. But search results display as from IP address.
  5. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    06 Dec 2016
    03 Jun 2013
    Link to this post
    Hello,

    Search result retrieve the current site domain which can be configured in IIS as the server IP address, to make the site use domain name different than the IP address specify the domain name in Administration->Settings->Advanced->System->Service Paths and in the textbox WorkflowBaseUrl type the domain name of the site.
    After this go to Administration->Search and Indexes and reindex the search index.

    Keep in mind changing WorkflowbaseUrl can cause problem in publishing content and pages and if this occurs refer to this KB article and the part of making modifications to windows hosts file.

    Regards,
    Stanislav Velikov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. John
    John avatar
    14 posts
    Registered:
    23 Aug 2012
    03 Jun 2013 in reply to Stanislav Velikov
    Link to this post
    I tried this and it is not working. I don't know about the configuration. Currently the web is hosted in cloud. And when admin logs in sitefinity backend, it is using IP address. We are not allowed to log in using domain name. Is there any other configuration for this?
  7. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    06 Dec 2016
    06 Jun 2013
    Link to this post
    Hi,

    Working with search index in cloud environment is not supported if the cloud environment is windows Azure, here is the documentation that outlines the limitations for running sitefinity in Azure. The cause is that sitefinity search index is written to the file system in App_Data/Sitefinity/Search folder which in the cloud where the virtual machine that hosts the site gets moved and all data written to the file system is lost as sitefinity doesn`t persist the file system data, this is a feature yet to be implemented.

    Regards,
    Stanislav Velikov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
7 posts, 0 answered