Every now and then, the Examine Indexing breaks, and all the Razor macros on the page throw the abovementioned error, with the following details:
Error Loading Razor Script (file: Featured Slider) The type initializer for 'Examine.ExamineManager' threw an exception. at Examine.ExamineManager.get_Instance() at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id) at umbraco.MacroEngines.DynamicNode.MediaById(String Id) at ASP._Page_macroScripts_FeaturedSlider_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\FeaturedSlider.cshtml:line 22 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) 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)
0.0429561
0.000442
umbracoMacro
Loading IMacroEngine script [done]
0.0429979
0.000042
umbracoMacro
Error loading MacroEngine script (file: FeaturedSlider.cshtml, Type: '' The type initializer for 'Examine.ExamineManager' threw an exception. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Line 22 of that cshtml file is as follows:
Line 22 of that cshtml file is the first line of the following - doesn't seem like something that would cause an error:
Error Loading Razor Script (file: Random Testimonial) The type initializer for 'Examine.ExamineManager' threw an exception. at Examine.ExamineManager.get_Instance() at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id) at umbraco.MacroEngines.DynamicNode.MediaById(String Id) at ASP._Page_macroScripts_RandomTestimonial_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\RandomTestimonial.cshtml:line 12 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) 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)
0.0597189
0.000284
umbracoMacro
Loading IMacroEngine script [done]
0.0597645
0.000046
umbracoMacro
Error loading MacroEngine script (file: RandomTestimonial.cshtml, Type: '' The type initializer for 'Examine.ExamineManager' threw an exception. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Line 12 mentioned above, refers to an empty line above the following:
Error Loading Razor Script (file: Random Product) The type initializer for 'Examine.ExamineManager' threw an exception. at Examine.ExamineManager.get_Instance() at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id) at umbraco.MacroEngines.DynamicNode.MediaById(String Id) at ASP._Page_macroScripts_RandomProduct_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\RandomProduct.cshtml:line 16 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) 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)
0.0618461
0.000411
umbracoMacro
Loading IMacroEngine script [done]
0.0619225
0.000076
umbracoMacro
Error loading MacroEngine script (file: RandomProduct.cshtml, Type: '' The type initializer for 'Examine.ExamineManager' threw an exception. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
0.0620363
0.000114
which again refers to an empty line above the following:
I can fix it by deleting the Examine indexes, but it recurs again every few weeks. I have no idea what causes it.
The funny thing is the 3 sites use the same macros, but only one of the sites throws this error, the other sites work fine.
The issue happened prevoiusly on a shared hosting environment, and is happening now since i've moved the site to a VPS, so i dont think it's a server issue. I have acess to server logs etc if somebody can point me in the direction of how to troubleshoot this?
I've never delved much into Examine so don't know where to start to be honest, so any advice would be appreciated.
Error Loading MacroEngine Script
I have 3 sites running on Umbraco 4.7.1.1
Every now and then, the Examine Indexing breaks, and all the Razor macros on the page throw the abovementioned error, with the following details:
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id)
at umbraco.MacroEngines.DynamicNode.MediaById(String Id)
at ASP._Page_macroScripts_FeaturedSlider_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\FeaturedSlider.cshtml:line 22
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
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)
The type initializer for 'Examine.ExamineManager' threw an exception.
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Line 22 of that cshtml file is as follows:
Line 22 of that cshtml file is the first line of the following - doesn't seem like something that would cause an error:
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id)
at umbraco.MacroEngines.DynamicNode.MediaById(String Id)
at ASP._Page_macroScripts_RandomTestimonial_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\RandomTestimonial.cshtml:line 12
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
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)
The type initializer for 'Examine.ExamineManager' threw an exception.
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Line 12 mentioned above, refers to an empty line above the following:
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id)
at umbraco.MacroEngines.DynamicNode.MediaById(String Id)
at ASP._Page_macroScripts_RandomProduct_cshtml.Execute() in c:\inetpub\vhosts\payslip.com.au\httpdocs\pps\macroScripts\RandomProduct.cshtml:line 16
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
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)
The type initializer for 'Examine.ExamineManager' threw an exception.
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
which again refers to an empty line above the following:
I can fix it by deleting the Examine indexes, but it recurs again every few weeks. I have no idea what causes it.
The funny thing is the 3 sites use the same macros, but only one of the sites throws this error, the other sites work fine.
The issue happened prevoiusly on a shared hosting environment, and is happening now since i've moved the site to a VPS, so i dont think it's a server issue. I have acess to server logs etc if somebody can point me in the direction of how to troubleshoot this?
I've never delved much into Examine so don't know where to start to be honest, so any advice would be appreciated.
Thanks heaps
Greg
Oops i forgot i'd already posted about this issue, here's the other post:
http://our.umbraco.org/forum/ourumb-dev-forum/bugs/39632-Periodic-failures-of-Examine-breaks-website
No responses.. bit dissappointing, considering this looks like a nasty bug to me. :(
is working on a reply...