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

Forums / Bugs & Issues / Search only returning Guid and Path fields

Search only returning Guid and Path fields

7 posts, 0 answered
  1. HRC
    HRC avatar
    44 posts
    Registered:
    16 Mar 2009
    24 Mar 2010
    Link to this post
    Hi,

    We have created other Sitefinity sites with Search and it worked fine.

    This new site search is non-responsive.

    There are 13 public pages available to anonymous and a total of 25 pages that are available to a member role.
    There are 2 search indexes: public, private
    The fieldsInfoProvider.xml file is out-of-the-box with no changes.
    -> Usually I start will everything and add fields to change the results. But no results to start with.

    The Public search index only returns only path and guid results for all public pages.
  2. Indexed words: 26
  3. Indexed pages: 13
  4. (i.e. Rank:1, Field:path, Text: ~/Home.aspx as seen in Luke)

    The Private search index is only returning the News Details page.
  5. Indexed words: 140
  6. Indexed pages: 25
  7. (50 results are the guid and path)

    I have tried to explicitly add fields but the results remain the same.

    Your help is much appreciated.

    Cheers,
    Roland
  • Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Mar 2010
    Link to this post
    Hello HRC,

    1. Check whether there are any relevant errors in the App_Data/sitefinity.log file
    2. Create a new master page - withouth css and any js, server side code etc. Only several ContentPlaceHolders. Then drop a GenericContent control, type a simple text. Create a new page index and run it. Check whether the newly added page is indexed.
    There could be some control or code on your pages/master page that blocks the crawler. The test above will help you to narrow down the issue.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  • Roland ten Holder
    Roland ten Holder avatar
    2 posts
    Registered:
    24 Mar 2010
    26 Mar 2010
    Link to this post
    Thanks for the tip Ivan.

    I have narrowed it down to Page.User.Identity.IsAuthenticated.

    In most of the pages I check to see if the user is authenticated, and if they are, I hide the login box.

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (Page.User.IsInRole("Members") AndAlso Page.User.Identity.IsAuthenticated) Then
            container.Visible = False
        End If
    End Sub

    I get a NullReference Exception when I try to index the site.

    Ca you suggest a way around this?

    Thanks,
    Roland
  • Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Mar 2010
    Link to this post
    Hello Roland ten Holder,

    Try using  if (HttpContext.Current.User.Identity.IsAuthenticated) instead.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  • Roland ten Holder
    Roland ten Holder avatar
    2 posts
    Registered:
    24 Mar 2010
    26 Mar 2010
    Link to this post
    Brilliant!

    Thanks so much - that fixed it.

    Cheeers,
    Roland
  • Mike Berlin
    Mike Berlin avatar
    16 posts
    Registered:
    19 Feb 2010
    21 Apr 2010
    Link to this post
    I ran into this exact same problem but it seems to be caused by using Session calls in my master page.  Whenever I try indexing the site I get the following error:

    "Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration."

    But I have set the site to use sessionstate in the web.config file.  I found this thread and it made me try this approach:

    HttpSessionState mySession = HttpContext.Current.Session;

    And then try using mySession[""] instead of Session[""] which worked.

    My question is why do I have to use HttpContext.Current.Session when I should be able to use Session like I do with every other web site.
  • Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Apr 2010
    Link to this post
    Hi Mike Berlin,

    During the crawler request some of the objects are null or they does not return the proper value. These are only single cases generally related to the context. You could also escape the crawler request for your code by adding
     if (!CmsContext.IsRequestCrawler(this.Context)) {}

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  • Register for webinar
    7 posts, 0 answered