Using the seach funtion in the starterkit returns: Error loading MacroEngine script (file: /search/products-view.cshtml)
Exeception returned: Error Loading Razor Script (file: Search products view) Object reference not set to an instance of an object. at ASP._Page_macroScripts_search_products_view_cshtml.Execute() in \macroScripts\search\products-view.cshtml:line 20 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
Otherwise you might need to debug the code in Visual Studio to find out exactly what is null. Something vital must have changed from the basic starter kit.
Starterkit seach function error
Using the seach funtion in the starterkit returns: Error loading MacroEngine script (file: /search/products-view.cshtml)
Exeception returned:
Error Loading Razor Script (file: Search products view) Object reference not set to an instance of an object. at ASP._Page_macroScripts_search_products_view_cshtml.Execute() in \macroScripts\search\products-view.cshtml:line 20
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
Line 20 contains:
IEnumerable<SearchResult> searchResults = ExamineManager.Instance.SearchProviderCollection[ "WebsiteSearcher" ].Search( searchString, true ).OrderByDescending( s => s.Score );
I haven't changed anything in the search scripts.
Thoughts?
Hi egeek,
Maybe the "WebsiteSearcher" have been remove from your ExamineSettings.config file?
It should look like this:
Otherwise you might need to debug the code in Visual Studio to find out exactly what is null. Something vital must have changed from the basic starter kit.
/Rune
Hi Rune,
Thanks, solved the problem. After upgrading to Umbraco 6.1.6 I did overwrite ExamineSettings.config.
Common mistake. Good thing you got it working. :)
/Rune
is working on a reply...