Search functionality

Posted by Community Admin on 04-Aug-2018 15:43

Search functionality

All Replies

Posted by Community Admin on 19-Aug-2011 00:00

Not sure if this has to do with the upgrade to 4.2 or something I have set wrong. But none of the links on the search page go anywhere.  Here's the scenario:

Home page has a search. Enter phrase "QR Codes".
Taken to search page with 1 result.
Click the link and the page just refreshes, there is no redirect to that page.

See http://www.pa-newspaper.org for example.  I've tried both default templates and neither seems to be working.

Posted by Community Admin on 19-Aug-2011 00:00

Hey Amanda,

It seems you removed the actual link from the search result template when you edited it. If you look at the source code for the QR-code resultpage it shows this:

1.<dt class="sfsearchResultTitle">
2.<a href="">The brick and mortar hyperlink</a>
3.</dt>
4.<dd class="sfsearchResultSnippet">QR Codes have become one of the new buzz words floating around the marketing/advertising industry. Learn more about QR Codes so you won't be left out of the conversation.</dd>
5.<dd class="sfsearchResultUrl">
6.<a></a>
7.</dd>

If you open the template again and make the <a href=""> to <a runat="server" href='<%# Eval("Link")%>'> it should work again...


Posted by Community Admin on 19-Aug-2011 00:00

Hi Jochem,

Thank you for the reply.  As far as I could recall, I don't think I ever edited the template (but it's been a while). So what I did was hit restore to default. here's the template I am using. Now the link doesn't appear at all.

<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sitefinity" %>
<%@ Register Assembly="Telerik.Sitefinity" 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" />

Posted by Community Admin on 19-Aug-2011 00:00

Hey Amanda,

Sorry to hear that, thought it was a 'simple' answer and don't want to get you into any further trouble but...

Checked your template you posted and it's the same as the default one. Strange, last time the href was in the <a> tag, now it's just an empty <a> tag.

Have you tried to post the search result widget on a new empty page? Just to check that it's the widget and not the template or some other widget on the page that's bugging you?

J.

Posted by Community Admin on 19-Aug-2011 00:00

I was also hoping it'd be an easy answer.  I created a new page and added the search results widget on to it. I'm getting the same results.

Posted by Community Admin on 19-Aug-2011 00:00

Did you remove the template/masterpage etc aswell ?

Seems like you're running alot of scripts, perhaps one is borking it...
Otherwise I'm leaving you in the hands of Telerik, they're the real experts.

Posted by Community Admin on 19-Aug-2011 00:00

Thank you very much Jochem for the suggestions! I changed the page template so it was the basic one column and still had the same issues.

It's interesting that you say it seems the site is running a lot of scripts. There shouldn't really be anything beyond what a normal install of Sitefinity runs. I don't believe we have anything extra added in at this point (except on the homepage for the image slider). Though I will say that this was a migration from 3.7 to 4.0 a long time ago and not a completely clean install.

Thank you again for trying to work through this. I'll wait to see what Telerik has to say.

Posted by Community Admin on 19-Aug-2011 00:00

Hey Amanda,

Well, a quick count gives the following for the homepage: 47 scripts and has 13 stylesheets. The sitefinity ones are loaded in debug mode. Upgrading from 3 to 4 is still tricky but since you're obviously live, I'd suggest creating a ticket, that'll perhaps solve it before the weekend kicks in, in the US.

Good luck!
J.

Posted by Community Admin on 19-Aug-2011 00:00

Thank you for the suggestions. I'll have to do that.  How are you getting the counts for the number of scripts and stylesheets?
I do have some extraneous stylesheets that I have to get rid of. Just a matter of finding the time. :)

Posted by Community Admin on 19-Aug-2011 00:00

I've used Yslow, which is a page speed tool for either on Firefox or Chrome, helps give you advice on scripts and stylesheets and how optimized your webpage is.

https://addons.mozilla.org/nl/firefox/addon/yslow/
https://chrome.google.com/webstore/detail/ninejjcohidippngpapiilnmkgllmakh?hl=nl

Feel free to give a shout jbokkers @ live . nl if you have any (non) sf related question, still have 3 days boring holiday left :)

Jochem.

Posted by Community Admin on 09-Nov-2011 00:00

Hi Everyone 
 
i am new to sitefinity  just implementing search results funtionality I just wanted to from where the value of Eval (HighLighterResult)  is coming 
<dd class="sfsearchResultHighLighter"><%# Eval("HighLighterResult")%></dd> .
 How can I customize even  more my search results .

Thanks
Raman

Posted by Community Admin on 14-Nov-2011 00:00

Hi Raman,

HighLighterResult takes the highlighted text from the search words entered and where it finds a match a highlight css class is applied. You can further customize the search results by adding your own styles or using jQuery to enhance further the functionality.

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

Posted by Community Admin on 06-Jun-2014 00:00

Hi Jochem,

I have similar problem where i am getting empty anchor for the result of items in dynamic modules

Please check my post at 

http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/sitefinity-search-on-dynamic-module-resulting-no-url

This thread is closed