More in this section

Forums / General Discussions / Exception when re-indexing

Exception when re-indexing

15 posts, 0 answered
  1. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    22 Feb 2011
    Link to this post
    Hi,

    When i create a site index it creates without an error (however searching on the site produces a '0 search results for x', for a term i know is on the site multiple times, and is selected to be searched in the search index), if i then click re-index on the created index a message box pops up reading, "Exception of type 'System.Web.HttpUnhandledException' was thrown.".

    The site is running through IIS, but if i run the site through the Project Manager, and click re-index on the index created when the site was running through IIS a message box pops up reading, 'Type "Telerik.Sitefinity.Publishing.Model.Dynamic_eb045f45fab64cbcb851827c91bb5495" cannot be resolved.'

    If i do the opposite and create an index when using the Project Manager, i receive the error when re-indexing; "Exception of type 'System.Web.HttpUnhandledException' was thrown.", if i then try to re-index that index when running the site in IIS, i receive message box, 'Type "Telerik.Sitefinity.Publishing.Model.Dynamic_92683eed7f6a471fa7c7d9ae7e75449c" cannot be resolved.'

    Any help would be much appreciated.

    Thanks,

    Louis
  2. Ivan Pelovski
    Ivan Pelovski avatar
    43 posts
    Registered:
    24 Sep 2012
    25 Feb 2011
    Link to this post
    Hi Louis Farrell,

    Would you please be more specific about the search index you have created? What types of content are you indexing? Also which version of Sitefinity are you using? Would you look at the error log of Sitefinity (located at "App_Data/Sitefinity/Logs") and provide us with the error information that is logged when the index fails to run.

    The problem could be in some custom control that you have on a page. If you create a new website from the ProjectManager and add some of the default controls to a single page and then runt the index or reindex the website do you get the same error?

    About the "Type "xxxx" cannot be resolved." error, it comes from the fact that the db schema is cached in the memory. If you create an index from one application it updates its schema, but another application that uses the same database does not know about that. So you need to reset the other application in order the schema to be reread.

    Best wishes,
    Ivan Pelovski
    the Telerik team
  3. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    25 Feb 2011
    Link to this post
    Hi Ivan,

    We are using Build 4.0.1098.0. When you questionned the content we were indexing, I tried every combination of content to be searched and found the error only occured when 'Static HTML in pages' was selected to be indexed. Currently all HTML in content blocks is set to be viewable by admins only (which will have happenned during the migration from 3.7 to 4.0, as i have not set each individual content block to have these permissions, i am logged in as an administrator when i create and re-index the indexes and when i search for a term in the frontend).

    I have looked in the logs and no messages are recorded when the error occurs. I have also created a new site in Project Manager, and have not found to have the same problem with that, even if i set all content on the new site to be viewable only by administrators.

    Apologies i can't be more helpful than that, is there anything else i should try to get to the bottom of this?

    Cheers,

    Louis
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Feb 2011
    Link to this post
    Hi Louis,

    The only way to tell you what the problem is for this case is getting the project locally and run it in debug mode.  If you have a custom controls I suggest that you should do this locally and see if there will be an error thrown somewhere in your code during the crawler request.

    Greetings,
    Ivan Dimitrov
    the Telerik team
  5. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    28 Feb 2011
    Link to this post
    Hi Ivan,

    I am having the same issue with the ReIndex since the search is not returning any results. I tried running the ReIndex locally while debugging and i got the same error. I am currently only indexing the static HTML pages.

    The error is: Exception of type 'System.Web.HttpUnhandledException' was thrown.

    Thanks,

    G

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    28 Feb 2011
    Link to this post
    Hi George ,

    Can you create a new project with one page and one content block control on it and try to replicate the issue? Can you send the database and the project to us using the support system? The issue comes from a control that you have on a page. Most probably this is one of the Navigation controls.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
  7. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    28 Feb 2011
    Link to this post
    Hi Ivan,

    i have tried to create a new project and replicate the problem, but I am unable to.

    Are you sure that the problem is due to a custom control? The only time any error is shown (Exception of type 'System.Web.HttpUnhandledException' was thrown.) is in the backend when trying to re-index the website, surely this has no connection to which pages show the indexed results when searched? I have created a new search index on the site and it is not connected to any search results etc, and still produces the same error.

    Thanks,

    Louis
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    02 Mar 2011
    Link to this post
    Hi Louis Farrell,

    Could you please send us your database, in a support ticket? We will debug it locally and see what we do about the issue.

    Best wishes,
    Georgi
    the Telerik team
  9. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    02 Mar 2011
    Link to this post
    I have created a new support ticket with our database and just sent it.

    Thanks,

    Louis
  10. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    02 Mar 2011
    Link to this post
    Hello Louis Farrell,

    Thanks, we will follow up there. 

    Greetings,
    Georgi
    the Telerik team
  11. sathiyaseelan
    sathiyaseelan avatar
    82 posts
    Registered:
    26 Aug 2008
    20 Apr 2011
    Link to this post
    Hi,

    I also getting the same error. search is no longer working in sitefinity 4....any idea now to fix it.

    Thanks,
    sathya
  12. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    20 Apr 2011
    Link to this post
    The solution they gave me was, that it will be a problem with one of your user controls either on a page or template in your website, mine was a custom navigation control.

    The problem line for me was:

    SiteMapNode currentNode = SiteMapBase.GetCurrentProvider().CurrentNode;

    inside a:

    public void menu_ItemDataBound(object sender, RadMenuEventArgs e)
    {

    in the backend of my control.

    Their solution was surround everything in:

    public void menu_ItemDataBound(object sender, RadMenuEventArgs e)
    {

    with:

    if (this.Page.Items["IsInIndexMode"] == null)
    {

    So it looked something like:

    public void menu_ItemDataBound(object sender, RadMenuEventArgs e)
    {
        if (this.Page.Items["IsInIndexMode"] == null)
        {
            SiteMapNode currentNode = SiteMapBase.GetCurrentProvider().CurrentNode;
     
            // rest of code
     
        }
    }

    This worked for me, hope this helps.

    Cheers,

    Louis

  13. sathiyaseelan
    sathiyaseelan avatar
    82 posts
    Registered:
    26 Aug 2008
    20 Apr 2011
    Link to this post
    Hi loui,

    Thanks for sharing your ideas. Unluckily its not working for me. I do have a custom navigation control in all of my templates. Any other change you did apart from this.

    My code is below:
        void RadPanelbar1_ItemDataBound(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            if (this.Page.Items["IsInIndexMode"] == null)
            {
                if (HttpContext.Current.Request.QueryString["cmspagemode"] != "preview" && Request.QueryString["cmspagemode"] != "edit" && Request.QueryString["cmspagemode"] != "preview")
                {
                    string sPageURL = Request.Url.AbsolutePath.ToLower();
                    if (sPageURL != null)
                    {
                        foreach (RadPanelItem item in RadPanelbar1.GetAllItems())
                        {
                            string sPage = item.NavigateUrl.Remove(0, item.NavigateUrl.LastIndexOf('/') + 1).ToLower();
                            if (sPageURL.Contains(sPage))
                            {
                                if (item != null)
                                {
                                    item.Selected = true;
                                    item.SelectedCssClass = "rtsSelected";
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }

    Also can you tell me what "IsInIndexMode" refers ?

    Thanks,
    sathya
     
  14. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    20 Apr 2011
    Link to this post
    Ivan's exact reply was:

    ---------------------------------------------------------------------------------------------------------------------------------

    The problem is in

    SiteMapNode currentNode = SiteMapBase.GetCurrentProvider().CurrentNode;

    You should escape the crawler request for the logic inside menu_ItemDataBound

    if(this.Page.Items["IsInIndexMode"] == null)
     
    {
     
       // this is not a crawler request add your logic
     
    }

    ---------------------------------------------------------------------------------------------------------------------------------

    Are you sure you haven't any other custom controls? Menubar? Sitemap?

    Other than this, i cannot be of any more help, apologies.

    Cheers,

    Louis
  15. sathiyaseelan
    sathiyaseelan avatar
    82 posts
    Registered:
    26 Aug 2008
    20 Apr 2011
    Link to this post
    hey loui,

    I don't have any other custom control other than navigation control. But still i am getting the same issue. Also while creating search index the folder itself not creating under /App_Data/Sitefinity/..

    I don't know why sitefinity people are not replying for this.

    Hope i have to fix it.

    Thanks,
    sathya
15 posts, 0 answered