CON-814 - Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml)

Created by Bug Reporter 14 Aug 2015, 10:25:47 Updated by Jakob Dyrby 24 Sep 2015, 14:55:41

Hi,

I'm getting the following error when trying to render an Umbraco Form using Umbraco.RenderMacro: Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml). I've attached the error logged in the UmbracoTraceLog.

We are running Umbraco 7.2.8 with Forms 4.1.4 and the form guid is being returned from a Form Picker within an ArcheType (1.9).

The guid is being returned from the ArcheType correctly and the problem exists even when I call the RenderMacro directly: Umbraco.RenderMacro("FormsRenderForm", new ).ToString(); (I have hard-coded the form guid and the error still occurs)

We are using the same approach in a 7.2.4 site running Forms 4.1.3 with Archetype (1.7.5) and that is working.

I have added the Http.Formatting assembly as suggested in the following article but that hasn't fixed the issue: https://our.umbraco.org/forum/ourumb-dev-forum/bugs/60341-Form-loads-correctly-but-error-message-appears

Could you please include james.wilkinson@sigma.se in any replies so that I can pick them up?

Thanks in advance,

James.

Attachment:http://www.umbraco.org/media/BugReport/635751519602820000UmbracoTraceLog.txt

Submitted by: Dave Brislane / dave.brislane@sigma.se

Comments

Jakob Dyrby 24 Sep 2015, 14:55:41

I have a very similar issue

I also get the error message rendered: "Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml)" But it only happens ''after'' the form has been submitted. The workflow actions are executed correctly and if go one step back in the browser I see the correct "thank you!" message

I'm using Umbraco 7.2.8 and Umbraco.Forms 4.1.4 also i'm using Microsoft.AspNet.WebApi.Client 5.2.3 and there by System.Net.Http.Formatting 5.2.3.0. the reason I say that is that others have resolved the problem by adding a reference to System.Net.Http.Formatting ''4.0.0.0'' see the link:

https://our.umbraco.org/forum/ourumb-dev-forum/bugs/60341-Form-loads-correctly-but-error-message-appears

But I really hope that it isn't necessary to downgrade.

The log look like this

2015-09-24 15:43:03,320 [19] INFO Umbraco.Web.Mvc.UmbracoPageResult - [P21280/T1/D6] Executing Umbraco RouteDefinition controller 2015-09-24 15:43:03,353 [19] WARN umbraco.macro - [P21280/T1/D6] Error loading partial view macro (View: ~/Views/MacroPartials/InsertUmbracoForm.cshtml). Exception: System.InvalidOperationException: Samlingen er blevet ændret. Optællingen bliver muligvis ikke udført. ved System.Collections.Generic.Dictionary2.Enumerator.MoveNext() ved System.Web.Mvc.ModelStateDictionary.Merge(ModelStateDictionary dictionary) ved Umbraco.Web.Mvc.ControllerExtensions.EnsureViewObjectDataOnResult(ControllerBase controller, ViewResultBase result) ved Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult) ved Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content) ved umbraco.macro.LoadPartialViewMacro(MacroModel macro) ved umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) 2015-09-24 15:43:03,353 [19] WARN umbraco.macro - [P21280/T1/D6] Error loading Partial View (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml). Exception: System.InvalidOperationException: Samlingen er blevet ændret. Optællingen bliver muligvis ikke udført. ved System.Collections.Generic.Dictionary2.Enumerator.MoveNext() ved System.Web.Mvc.ModelStateDictionary.Merge(ModelStateDictionary dictionary) ved Umbraco.Web.Mvc.ControllerExtensions.EnsureViewObjectDataOnResult(ControllerBase controller, ViewResultBase result) ved Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult) ved Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content) ved umbraco.macro.LoadPartialViewMacro(MacroModel macro) ved umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)


Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty:

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: