Umbraco 9 Forms - Error rendering on site (InsertUmbracoFormWithTheme)
Hi!
I have an Umbraco 9 project where I have installed Umbraco Forms (.NET 5: dotnet add package Umbraco.Forms) and then built and published the project to a site. Does anyone know why the error, described below, occurrs?
The Form administration is working in the Backend and I have created a form and added it to a page. The problem is when I go to the published page where I have added the form, there is just an error message:
I have pasted the actual error and stacktrace further down for the above error. But first I should mention that I have not bought a Umbraco Forms license since I would like to test it first on my local computer. The second thing I would like to mention is that I'm using the "Igloo"-theme.
Since the stacktrace shows that the error occurrs after calling "Umbraco.Extensions.HtmlHelperRenderExtensions.UmbracoForm.GenerateEndForm()" it seems to me that the error is located in Umbraco and not the Igloo-theme, but I may be wrong about this since the Igloo-theme is called earlier in the stacktrace.
The error message/stacktrace from the Umbraco log:
System.InvalidOperationException: The response headers cannot be modified because the response has already started.
at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.ThrowIfReadOnly()
at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.set_Item(String key, StringValues value)
at Microsoft.AspNetCore.Http.ResponseCookies.Append(String key, String value, CookieOptions options)
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenStore.SaveCookieToken(HttpContext httpContext, String token)
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.SaveCookieTokenAndHeader(HttpContext httpContext, String cookieToken)
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetAndStoreTokens(HttpContext httpContext)
at Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions.GetHtml(IAntiforgery antiforgery, HttpContext httpContext)
at Umbraco.Extensions.HtmlHelperRenderExtensions.UmbracoForm.GenerateEndForm()
at Microsoft.AspNetCore.Mvc.Rendering.MvcForm.Dispose()
at AspNetCore.Views_Partials_Forms_Themes_igloo_Render.ExecuteAsync() in C:\Projects\Umbraco\Umbraco9\CustomerX-UmbracoForms\CustomerX.Site\Views\Partials\Forms\Themes\igloo\Render.cshtml:line 54
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments)
at AspNetCore.Views_MacroPartials_InsertUmbracoFormWithTheme.ExecuteAsync() in C:\Projects\Umbraco\Umbraco9\CustomerX-UmbracoForms\CustomerX.Site\Views\MacroPartials\InsertUmbracoFormWithTheme.cshtml:line 51
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.Execute(ViewComponentContext context)
at Umbraco.Cms.Web.Common.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)
at Umbraco.Cms.Web.Common.Macros.MacroRenderer.<>c__DisplayClass24_0.<ExecuteMacroOfType>b__0()
at Umbraco.Cms.Web.Common.Macros.MacroRenderer.ExecuteProfileMacroWithErrorWrapper(MacroModel macro, String msgIn, Func`1 getMacroContent, Func`1 msgErr)
Umbraco 9 Forms - Error rendering on site (InsertUmbracoFormWithTheme)
Hi!
I have an Umbraco 9 project where I have installed Umbraco Forms (.NET 5: dotnet add package Umbraco.Forms) and then built and published the project to a site. Does anyone know why the error, described below, occurrs?
The Form administration is working in the Backend and I have created a form and added it to a page. The problem is when I go to the published page where I have added the form, there is just an error message:
I have pasted the actual error and stacktrace further down for the above error. But first I should mention that I have not bought a Umbraco Forms license since I would like to test it first on my local computer. The second thing I would like to mention is that I'm using the "Igloo"-theme.
Since the stacktrace shows that the error occurrs after calling "Umbraco.Extensions.HtmlHelperRenderExtensions.UmbracoForm.GenerateEndForm()" it seems to me that the error is located in Umbraco and not the Igloo-theme, but I may be wrong about this since the Igloo-theme is called earlier in the stacktrace.
The error message/stacktrace from the Umbraco log:
Hi,
Is this issue resolved, I am facing the same in v12.2 of Umbraco, or any workaround on this ?
Thanks, Gurumurthy JV
Hey,
I am also having this issue in Umbraco 13.3.0 and IglooTheme 13.0.3.
Any solution?
Br Ali
is working on a reply...