Try our conversational search powered by Generative AI!
AI OnAI Off
Sep 06, 2016
Nov 14, 2016
CMS Core
Closed, Fixed and tested
If ITabDefinitionRepository.List (or any other API such as IContentTypeRepository.Load/List/Save that is dependent on ITabDefinitionRepository) is called before Episerver has scanned typed models, typed information is no longer being applied.
Could for example be caused by an initialization module without correct dependency:
[InitializableModule, ModuleDependency(typeof(ServiceContainerInitialization))] public class Example : IInitializableModule { public void Initialize(InitializationEngine context) => ServiceLocator.Current.GetInstance<ITabDefinitionRepository>().List(); public void Uninitialize(InitializationEngine context) { } }
Workaround: Change module dependency to EPiServer.Web.InitializationModule. It is not recommended to call any Episerver API without a dependency on the CMS initialization module.