Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hello ThereseM
Some time ago, Optimizely released the Official List property. You can read more about it here:
https://world.optimizely.com/blogs/bartosz-sekula/dates/2023/1/official-list-property-support/
If the issue occurs only with new properties, it might be worth switching to this new approach—it could help resolve your problems.
We are running EPiServer CMS 12.32.3. We have serveral different PropertyLists on our site and have been using them for years.
But now I have run into an issue where I get a TypeMismatchException that craches the site when I start it the first time after adding a new PropertyList with a new PropertyDefinitionTypePlugIn. If I restart the site after the crash everything works as expected and I can use the PropertyList as intended. Has anyone else run into this issue? Does anyone know how I can fix it?
Below is an example of the error I get on the first startup after adding a brand new PropertyList.
2025-03-20 10:32:57.671 [Error] Hosting failed to start
EPiServer.Framework.Initialization.InitializationException: Initialize action failed for Initialize on class EPiServer.Initialization.Internal.ModelSyncInitialization, EPiServer, Version=12.22.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
---> EPiServer.Core.TypeMismatchException: Type 'System.Collections.Generic.IList`1[[CMS.Models.Blocks.Utbildning.StudieplanversionData, CMS.Models, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' could not be mapped to a PropertyDefinitionType
at EPiServer.DataAbstraction.RuntimeModel.Internal.PropertyDefinitionSynchronizer.ResolveType(PropertyDefinitionModel model)
at EPiServer.DataAbstraction.RuntimeModel.Internal.PropertyDefinitionSynchronizer.CreatePropertyDefinition(PropertyDefinitionModel model, Int32 contentTypeID)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.CommitProperties(Boolean deleteUnusedTypes)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean forceCommit)
at EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.<Initialize>b__0()
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
--- End of inner exception stack trace ---
at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
at EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions)
at EPiServer.Framework.Initialization.InitializationEngine.Initialize()
at EPiServer.Hosting.Internal.EPiServerFrameworkHost.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)