Hi,
In Umbraco 7.4.1 we get an error loaing NewsletterSubscribe.cshtml.
This happens even if we remove all the code from the file.
I suspect that the macro parameter type "Newletter Studio Mailing List Picker" depends in the Microsoft.Web.Helpers.dll file which was removed i Umbraco 7.3.0. I have tried copying the file back, but that totally crashed the Umbraco site.
I get the following stack trace in my log file:
2016-04-11 11:01:32,827 [P10908/D3/T29] WARN umbraco.macro - Error loading MacroEngine script (file: NewsletterSubscribe.cshtml, Type: ''. Exception: System.Web.HttpCompileException (0x80004005): :****\AppWebnewslettersubscribe.cshtml.70df5e80.ycfpmb0_.0.cs(24): error CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath)
at System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance[T](IVirtualPathFactory factory, String virtualPath)
at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath)
at System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance[T](IVirtualPathFactory factory, String virtualPath)
at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory)
at umbraco.MacroEngines.RazorMacroEngine.CompileAndInstantiate(String virtualPath)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
at umbraco.macro.loadMacroScript(MacroModel macro)
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
We need to take some time to try to figure out why but could it just be that we have some old using-references in the .cshtml-file that we ship? Do you mind having a look at that?
Ok, having another look at it, this is not an issue with Newsletter Studio. It seems like Umbraco has an issue viewing macroscripts. Seems like changing this to a partial macro will do the trick. I'll also check the issue-tracker to see if this issue is reported or fixed.
Error loading MacroEngine script (file: NewsletterSubscribe.cshtml)
Hi, In Umbraco 7.4.1 we get an error loaing NewsletterSubscribe.cshtml. This happens even if we remove all the code from the file. I suspect that the macro parameter type "Newletter Studio Mailing List Picker" depends in the Microsoft.Web.Helpers.dll file which was removed i Umbraco 7.3.0. I have tried copying the file back, but that totally crashed the Umbraco site. I get the following stack trace in my log file:
2016-04-11 11:01:32,827 [P10908/D3/T29] WARN umbraco.macro - Error loading MacroEngine script (file: NewsletterSubscribe.cshtml, Type: ''. Exception: System.Web.HttpCompileException (0x80004005): :****\AppWebnewslettersubscribe.cshtml.70df5e80.ycfpmb0_.0.cs(24): error CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath) at System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance[T](IVirtualPathFactory factory, String virtualPath) at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath) at System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance[T](IVirtualPathFactory factory, String virtualPath) at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory) at umbraco.MacroEngines.RazorMacroEngine.CompileAndInstantiate(String virtualPath) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage) at umbraco.macro.loadMacroScript(MacroModel macro) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Hi!
Thanks for sharing this!
We need to take some time to try to figure out why but could it just be that we have some old using-references in the .cshtml-file that we ship? Do you mind having a look at that?
Ok, having another look at it, this is not an issue with Newsletter Studio. It seems like Umbraco has an issue viewing macroscripts. Seems like changing this to a partial macro will do the trick. I'll also check the issue-tracker to see if this issue is reported or fixed.
Hi!
Thanks for the heads up!
We'll have a look to see if we can ship with a partial in the future.
// m
Hello, Ole.
I had the same issue a week ago and wound up creating the macro partial myself.
Here it is if you haven't already gotten around to it. FYI, the markup is using the Foundation grid framework and Font Awesome.
Thanks, Matthew. We've already got this up and running, but this is nice to have if others should have the same issue.
is working on a reply...