Null reference in EPiStore search

Member since: 2008
 

I have installed EPiStore 2.5, and I get a null reference exception from the SearchDataSource in the search user control. The stack trace is this:

   at EPiServer.DataAccess.PageTextIndexDB.<>c__DisplayClass8.<SearchPages>b__7()
   at EPiServer.DataAccess.DataAccessBase.<>c__DisplayClass1`1.<Execute>b__0()
   at EPiServer.DataAccess.DatabaseFactory.Execute[TResult](Action`1 method)
   at EPiServer.DataAccess.DataAccessBase.Execute[TResult](Action`1 action)
   at EPiServer.DataAccess.PageTextIndexDB.SearchPages(TextSearchParameters searchParams, Int32 pageID, Int32 maxAllowedHits)
   at EPiServer.Web.WebControls.SearchDataSource.Select(DataSourceSelectArguments arguments)
   at EPiServer.Web.WebControls.GenericDataSourceView`1.ExecuteSelect(DataSourceSelectArguments arguments)

Any hints as to what might be going on in these compiler generated methods?

The search control is out of the box, but my database is a converted version from an old EPiStore 2.1 installation. I have managed to get everything else but the order history (not important) to work with the new templates.

#28837 Mar 24, 2009 15:33
  • Member since: 2008
     
    Oh, I also discovered that the DataAccessBase class has been changed from R2 to R2 SP1 using several generic methods (like the ones in the stack trace). Could this have made it incompatible with the EPiStore search (even though I am using the one that is supposed to be compiled for R2 SP1)
    #28838 Mar 24, 2009 15:36
  • Member since: 2008
     

    I forgot to post the workaround for this. The problem disappeared when I explicitly set the LanguageBranch property of the SearchDataSource. That shouldn't be needed, it should select automatically. But it seems that in some situations with migrated/imported pages null LanguageBranch causes the null reference exception. I recently came across such a situation again and it was not related to EPiStore but to pages imported from a CMS 4 to CMS 5 site.

    #34930 Nov 21, 2009 8:50
  • Member since: 2010
     

    Do you have any idea why I'm getting "Pages Object reference not set to an instance of an object" and the same error log message as above from using the Online Center Search after converting the Master Language from en to en-GB using the Advanced Language Tool? I tried this on an isolated page, search worked before but not after conversion. Re-indexing does nothing to fix this.

     

    #55531 Dec 06, 2011 17:36
  • Member since: 2008
     

    Well, I can see a vague connection - both cases have some problem with the default language branch. Somehow it does not connect the "null" language branch to the default one. In my case I could set the language branch explicitly, but doing this in the Online Center Search is probably harder. I'm afraid I don't have access to the site I worked on back then to check if the Online Center search works there or not.

    #55534 Dec 06, 2011 19:49