U4-4462 - [bug] 7.0.3 parameterless constructor breaking Contour form

Created by Devin Bost 18 Mar 2014, 10:02:02 Updated by Shannon Deminick 21 Jun 2017, 07:59:55

Relates to: U4-4182

Hi,

This bug is breaking custom forms created using Contour. Here is the relevant part of the log:

2014-03-18 02:14:28,519 [82] INFO Umbraco.Core.UmbracoApplicationBase - [Thread 89] Application shutdown. Reason: ConfigurationChange 2014-03-18 02:14:43,215 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Determining hash of code files on disk 2014-03-18 02:14:43,261 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Hash determined (took 43ms) 2014-03-18 02:14:43,267 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler 2014-03-18 02:14:43,439 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 35 (took 170ms) 2014-03-18 02:14:43,606 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter 2014-03-18 02:14:43,606 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter, found 0 (took 0ms) 2014-03-18 02:14:43,606 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyValueConverter 2014-03-18 02:14:43,607 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyValueConverter, found 15 (took 0ms) 2014-03-18 02:14:43,638 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Web.Mvc.SurfaceController 2014-03-18 02:14:43,642 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Web.Mvc.SurfaceController, found 4 (took 3ms) 2014-03-18 02:14:43,650 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Web.WebApi.UmbracoApiController 2014-03-18 02:14:43,733 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Web.WebApi.UmbracoApiController, found 31 (took 82ms) 2014-03-18 02:14:43,738 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Core.Media.IThumbnailProvider 2014-03-18 02:14:43,739 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Core.Media.IThumbnailProvider, found 3 (took 0ms) 2014-03-18 02:14:43,739 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Core.Media.IImageUrlProvider 2014-03-18 02:14:43,739 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Core.Media.IImageUrlProvider, found 1 (took 0ms) 2014-03-18 02:14:44,590 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of umbraco.interfaces.IApplication 2014-03-18 02:14:44,591 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of umbraco.interfaces.IApplication, found 7 (took 0ms) 2014-03-18 02:14:44,700 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of Umbraco.Web.Trees.TreeController 2014-03-18 02:14:44,700 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 4 (took 0ms) 2014-03-18 02:14:44,773 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Starting resolution types of umbraco.interfaces.ITree 2014-03-18 02:14:44,773 [18] INFO Umbraco.Core.PluginManager - [Thread 1] Completed resolution of types of umbraco.interfaces.ITree, found 19 (took 0ms) 2014-03-18 02:14:44,842 [18] INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Initializing Examine and binding to business logic events 2014-03-18 02:14:45,528 [18] INFO Umbraco.Web.Search.ExamineEvents - [Thread 1] Adding examine event handlers for index providers: 3 2014-03-18 02:14:52,613 [18] INFO umbraco.content - [Thread 15] Loading content from disk cache... 2014-03-18 02:14:52,850 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Starting resolution types of Umbraco.Core.Persistence.Mappers.BaseMapper 2014-03-18 02:14:52,850 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Completed resolution of types of Umbraco.Core.Persistence.Mappers.BaseMapper, found 20 (took 0ms) 2014-03-18 02:14:53,695 [18] ERROR Umbraco.Core.PluginManager - [Thread 15] Error creating type Umbraco.Core.Models.PublishedContent.PublishedPropertyType+CompatConverter System.MissingMethodException: No parameterless constructor defined for this object. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at Umbraco.Core.PluginManager.CreateInstances[T](IEnumerable`1 types, Boolean throwException) 2014-03-18 02:14:53,854 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Starting resolution types of Umbraco.Core.PropertyEditors.IParameterEditor 2014-03-18 02:14:53,858 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Completed resolution of types of Umbraco.Core.PropertyEditors.IParameterEditor, found 42 (took 4ms) 2014-03-18 02:14:58,647 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Starting resolution types of Umbraco.Core.Macros.XsltExtensionAttribute 2014-03-18 02:14:58,647 [18] INFO Umbraco.Core.PluginManager - [Thread 15] Completed resolution of types of Umbraco.Core.Macros.XsltExtensionAttribute, found 1 (took 0ms) 2014-03-18 02:15:26,934 [18] INFO Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of Umbraco.Core.PropertyEditors.IParameterEditor 2014-03-18 02:15:26,934 [18] INFO Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of Umbraco.Core.PropertyEditors.IParameterEditor, found 42 (took 0ms) 2014-03-18 02:15:26,959 [18] INFO Umbraco.Core.PluginManager - [Thread 16] Starting resolution types of umbraco.cms.businesslogic.macro.IMacroEngine 2014-03-18 02:15:26,960 [18] INFO Umbraco.Core.PluginManager - [Thread 16] Completed resolution of types of umbraco.cms.businesslogic.macro.IMacroEngine, found 2 (took 0ms) 2014-03-18 02:15:27,824 [18] WARN Umbraco.Web.Dictionary.DefaultCultureDictionary - [Thread 16] Error returning dictionary item 'Submit'. Exception: System.ArgumentException: No key Submit exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at Umbraco.Web.Dictionary.DefaultCultureDictionary.get_Item(String key) 2014-03-18 02:15:27,854 [18] WARN Umbraco.Web.Dictionary.DefaultCultureDictionary - [Thread 16] Error returning dictionary item 'Previous'. Exception: System.ArgumentException: No key Previous exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at Umbraco.Web.Dictionary.DefaultCultureDictionary.get_Item(String key) 2014-03-18 02:15:27,888 [18] WARN Umbraco.Web.Dictionary.DefaultCultureDictionary - [Thread 16] Error returning dictionary item 'Next'. Exception: System.ArgumentException: No key Next exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at Umbraco.Web.Dictionary.DefaultCultureDictionary.get_Item(String key)

I have attached the Contour form responsible for breaking the constructor. When I click on the "Submit" button, the application does nothing. This renders my custom Contour forms unusable on both production and development.

5 Attachments

Download MemberForms_MembersRegistration.ucf

Download NewMemberForm.cs

Download UmbracoTraceLog.txt

Download UmbracoTraceLog.txt

Comments

Devin Bost 18 Mar 2014, 10:02:03

Similar bug involving parameterless constructor.


Devin Bost 18 Mar 2014, 10:02:03

This bug seems to be the underlying cause.


Devin Bost 18 Mar 2014, 10:02:03

Same parameterless constructor issue.


Devin Bost 18 Mar 2014, 10:18:13

By the way, in the C# file, you will see that I'm using SqlMembershipProvider through the static Membership class.


Sebastiaan Janssen 18 Mar 2014, 10:40:59

So the problem is "No key Submit exists in dictionary" - do you have this key (and the others mentioned) in your dictionary?

What else breaks for you? I'm not sure I follow.


Devin Bost 18 Mar 2014, 18:40:07

I just attached the entire log file. Essentially, I created a custom Contour form using Visual Studio, but when I try to use the form, it fails.


Tim Geyssens 19 Mar 2014, 13:40:19

So you are creating Contour forms code first?


Tim Geyssens 19 Mar 2014, 13:40:32

And when placing those on your frontend it fails?


Devin Bost 19 Mar 2014, 21:33:00

Hi @timgeyssens, That is exactly what is happening. I am creating Contour forms code first, and it fails when I place the code on the frontend.


Devin Bost 19 Mar 2014, 22:27:47

I know this is off topic, but are either of you gentlemen going to be at uWestFest?


Shannon Deminick 24 Mar 2014, 07:57:23

Is this bug a possible duplicate of this? http://issues.umbraco.org/issue/U4-4182


Shannon Deminick 24 Mar 2014, 07:57:44

I'd say so given the stack trace


Devin Bost 24 Mar 2014, 10:40:30

Hi @Shandem, it may be. I noticed that U4-4182 was supposedly fixed with Umbraco 7.1. Would you like me to test it on 7.1?


Sebastiaan Janssen 24 Mar 2014, 14:03:43

@dbost Would be great if you could give it a go with the RC that we released last week, it contains that fix.


Devin Bost 24 Mar 2014, 14:26:56

Hi @sebastiaan, I'll give it a shot and report my findings here. I should be able to test this by tomorrow evening.


Devin Bost 26 Mar 2014, 01:40:08

When I try to load the form in Umbraco 7.1.0, I get a yellow screen of death. I'm wondering if I'm forgetting a step in the migration process. Here's the output:

Server Error in '/' Application.

Could not load types from assembly Umbraco.Forms.Core.Providers.V6, Version=3.0.20.0, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ICacheDispatcher' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ITypeFinder' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.ReflectionTypeLoadException: Could not load types from assembly Umbraco.Forms.Core.Providers.V6, Version=3.0.20.0, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ICacheDispatcher' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ITypeFinder' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ReflectionTypeLoadException: Could not load types from assembly Umbraco.Forms.Core.Providers.V6, Version=3.0.20.0, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ICacheDispatcher' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ITypeFinder' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. ] Umbraco.Core.TypeFinder.GetTypesWithFormattedException(Assembly a) +382 Umbraco.Core.TypeFinder.GetClasses(Type assignTypeFrom, IEnumerable1 assemblies, Boolean onlyConcreteClasses, Func2 additionalFilter) +332 Umbraco.Core.TypeFinder.GetClasses(Type assignTypeFrom, IEnumerable1 assemblies, Boolean onlyConcreteClasses, Func2 additionalFilter) +925 Umbraco.Core.TypeFinder.FindClassesOfType(IEnumerable1 assemblies, Boolean onlyConcreteClasses) +62 Umbraco.Core.TypeFinder.FindClassesOfType(IEnumerable1 assemblies) +45 Umbraco.Core.<>c__DisplayClass411.<ResolveTypes>b__40() +60 Umbraco.Core.PluginManager.LoadViaScanningAndUpdateCacheFile(TypeList typeList, TypeResolutionKind resolutionKind, Func1 finder) +46 Umbraco.Core.PluginManager.ResolveTypes(Func1 finder, TypeResolutionKind resolutionType, Boolean cacheResult) +2254 Umbraco.Core.PluginManager.ResolveTypes(Boolean cacheResult, IEnumerable1 specificAssemblies) +149 Umbraco.Core.CoreBootManager.InitializeApplicationEventsResolver() +46 Umbraco.Web.WebBootManager.InitializeApplicationEventsResolver() +5 Umbraco.Core.CoreBootManager.Initialize() +257 Umbraco.Web.WebBootManager.Initialize() +18 Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +90 Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9

[HttpException (0x80004005): Could not load types from assembly Umbraco.Forms.Core.Providers.V6, Version=3.0.20.0, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ICacheDispatcher' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ITypeFinder' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. ] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9936761 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Could not load types from assembly Umbraco.Forms.Core.Providers.V6, Version=3.0.20.0, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ICacheDispatcher' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.Interfaces.ITypeFinder' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. ] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

Is there something I'm missing?


Devin Bost 26 Mar 2014, 01:56:49

I removed a reference that was not required (Umbraco.Forms.UI.dll) but still got this:

Server Error in '/' Application.

Could not load types from assembly Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.ExtenderControlBase' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.Design.ExtenderControlBaseDesigner`1' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.ReflectionTypeLoadException: Could not load types from assembly Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.ExtenderControlBase' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.Design.ExtenderControlBaseDesigner`1' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ReflectionTypeLoadException: Could not load types from assembly Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.ExtenderControlBase' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.Design.ExtenderControlBaseDesigner1' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. ] Umbraco.Core.TypeFinder.GetTypesWithFormattedException(Assembly a) +382 Umbraco.Core.TypeFinder.GetClasses(Type assignTypeFrom, IEnumerable1 assemblies, Boolean onlyConcreteClasses, Func2 additionalFilter) +332 Umbraco.Core.TypeFinder.FindClassesOfType(IEnumerable1 assemblies, Boolean onlyConcreteClasses) +62 Umbraco.Core.TypeFinder.FindClassesOfType(IEnumerable1 assemblies) +45 Umbraco.Core.<>c__DisplayClass411.b__40() +60 Umbraco.Core.PluginManager.LoadViaScanningAndUpdateCacheFile(TypeList typeList, TypeResolutionKind resolutionKind, Func1 finder) +46 Umbraco.Core.PluginManager.ResolveTypes(Func1 finder, TypeResolutionKind resolutionType, Boolean cacheResult) +2254 Umbraco.Core.PluginManager.ResolveTypes(Boolean cacheResult, IEnumerable`1 specificAssemblies) +149 Umbraco.Core.CoreBootManager.InitializeApplicationEventsResolver() +46 Umbraco.Web.WebBootManager.InitializeApplicationEventsResolver() +5 Umbraco.Core.CoreBootManager.Initialize() +257 Umbraco.Web.WebBootManager.Initialize() +18 Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +90 Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9

[HttpException (0x80004005): Could not load types from assembly Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.ExtenderControlBase' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.Design.ExtenderControlBaseDesigner`1' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. ] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9936761 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Could not load types from assembly Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null, errors: Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.ExtenderControlBase' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. Exception: System.TypeLoadException: Could not load type 'AjaxControlToolkit.Design.ExtenderControlBaseDesigner`1' from assembly 'Umbraco.Forms.References, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'. ] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

Then, when I refreshed the page, I got this:

Server Error in '/' Application.

Could not load type 'Umbraco.Forms.Core.FieldConditionActionType' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Could not load type 'Umbraco.Forms.Core.FieldConditionActionType' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: Could not load type 'Umbraco.Forms.Core.FieldConditionActionType' from assembly 'Umbraco.Forms.Core, Version=1.1.13.2, Culture=neutral, PublicKeyToken=null'.] Umbraco.Forms.CodeFirst.FormManager.SynchronizeForm(Type typeForm) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:582 Umbraco.Forms.CodeFirst.FormManager.SynchronizeForms() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:201 Umbraco.Forms.CodeFirst.FormManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:24 Umbraco.Forms.CodeFirst.UmbracoManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:36 Umbraco.Forms.CodeFirst.UmbracoManager.SynchronizeIfNotSynchronized() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:21 Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule.context_BeginRequest(Object sender, EventArgs e) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\ContourFormBuilderHttpModule.cs:27 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

What is interesting is that I do not use TeamCity for building.


Devin Bost 31 Mar 2014, 08:00:15

I was able to reproduce this error page from a clean solution. The only exogenous DLLs that were added to the bin directory were these:

UmbracoExtensions (where my code-first form is defined).

Contour.Contrib

Recaptcha (from Contour.Contrib)

I added these DLLs in the order listed above. (I just added each one to get its respective error to go away. You will see them in the attached log file.)


Devin Bost 31 Mar 2014, 08:21:09

I am wondering if the Recaptcha type is breaking the SynchronizeForm method.


Devin Bost 01 Apr 2014, 03:52:53

Perhaps the issue relates to an ambiguous setter in Umbraco.Forms.CodeFirst.FormManager.SynchronizeForm between a FieldConditionRule and a FieldConditionRuleAttribute. The issue would appear where form.AllFields.GetEnumerator()is used during construction of the FieldConditionRule.

It's just a guess.


Devin Bost 01 Apr 2014, 04:01:28

I just noticed that it looked rather odd when I was trying to trace the call stack with Reflector. Here's what it looks like:

using (List.Enumerator enumerator9 = dictionary.Single<KeyValuePair<string, List>>(func12).Value.GetEnumerator()) { Func<Field, bool> func10 = null; FieldConditionRuleAttribute rule; while (enumerator9.MoveNext()) { rule = enumerator9.Current; FieldConditionRule rule = new FieldConditionRule ; if (func10 == null) { func10 = x => x.Caption == rule.Field; } rule.Field = form.AllFields.Single(func10).Id; f.Condition.Rules.Add(rule); flag = true; } }


Devin Bost 02 Apr 2014, 09:20:09

I realize that these expressions are probably created at the IL level or using reflection, but without the source code, I'm not sure how else I can help.


Shannon Deminick 21 Jun 2017, 07:59:55

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: