Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Greg Berlin 818 posts 634 karma points
    Apr 08, 2013 @ 02:27
    Greg Berlin
    0

    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:

    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.04295610.000442
    umbracoMacroLoading IMacroEngine script [done]0.04299790.000042
    umbracoMacroError 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:

              <div class="featured_slider_image_valign">
                <img src="@featuredImage.umbracoFile" style="width:373px" alt="[email protected]"/>
              </div>

     

    another error is this:
    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.05971890.000284
    umbracoMacroLoading IMacroEngine script [done]0.05976450.000046
    umbracoMacroError 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:


    @if (!@String.IsNullOrEmpty(@testimonialImage ){
    <div class="testimonial_author">
      <img src="@testimonialImage" style="width:112px;height:77px" alt="@testimonial.Author" />
    </div>
    }
    final erroring script:

    umbracoMacroError 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.06184610.000411
    umbracoMacroLoading IMacroEngine script [done]0.06192250.000076
    umbracoMacroError 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.06203630.000114

    which again refers to an empty line above the following:

      
    <href="@randomNode.Url">
      <div class="new_products_image" style="text-align:center">
          <img src="@featuredImage" style="max-width:112px;max-height:77px;" alt="@randomNode .Name" />
      </div>

     

    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

  • Greg Berlin 818 posts 634 karma points
    Apr 08, 2013 @ 02:49
    Greg Berlin
    0

    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. :(

Please Sign in or register to post replies

Write your reply to:

Draft