Copied to clipboard

Flag this post as spam?

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


  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 19, 2013 @ 19:48
    Jeavon Leopold
    0

    After upgrading to v6.0 7 - No MacroEngine found for extension 'cshtml'

    On cold start of a website upgraded from v6.0.5 to v6.0.7 I am seeing the follow exception

    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> umbraco.cms.businesslogic.macro.MacroEngineException: No MacroEngine found for extension 'cshtml'
       at umbraco.cms.businesslogic.macro.MacroEngineFactory.GetByExtension(String extension)
       at umbraco.cms.businesslogic.macro.MacroEngineFactory.GetByFilename(String filename)
       at umbraco.macro.loadMacroScript(MacroModel macro)
       at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
       at umbraco.presentation.templateControls.Macro.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at umbraco.presentation.templateControls.Macro.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.default_aspx.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
    However, if I then refresh the browser to make second request the exception is gone and the site is fine.
    I'm just trying to deterime if this is a Umbraco v6.0.7 issue or something specifc to this site, has anyone else seen this issue?

    Thanks,

    Jeavon
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 26, 2013 @ 20:04
    Jeavon Leopold
    100

    In case anyone else has this issue, it appears that it is caused by having the MacroErrors setting in umbracoSettings.config set to "Throw". I'm not sure why this should happen but setting it to "Inline" stoped this exception from occuring.

  • Allan 42 posts 192 karma points
    Jun 29, 2015 @ 13:46
    Allan
    0

    Still getting this on a balanced 6.2.4 even after changing config to 'inline'. Site works ok, but can be problematic at times... one server is really misbehaving...

    The 'cshtml' file that errors produces metadata so it is likely that it is the first macro loaded. Have written try catches around things to help (overkill).

    Any follow up advice greatly appreciated.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 27, 2013 @ 12:28
    Sebastiaan Janssen
    0

    Huh.. weird, I've set it to throw before and it worked fine. Is it reproducible if you make it throw again?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 27, 2013 @ 12:29
    Sebastiaan Janssen
    0

    Ooh, it might be this one, can you try to see if that helps? http://our.umbraco.org/forum/developers/razor/36894-No-MacroEngine-found-for-extension-'cshtml'

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 27, 2013 @ 23:20
    Jeavon Leopold
    0

    I don't know if it's specific to a certain site/config but it's on my list to try to reproduce. Certainly on this site when set to throw there are a lot more exceptions appearing in the log4net file which is a bit odd as macro exceptions are logged even when not set to throw, I will investigate further when I have spare few mins :-)

Please Sign in or register to post replies

Write your reply to:

Draft