SearchResults widget issue
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.
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="
<%@ 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"
/>
<%@ 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"
/>
@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
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.
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
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?
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