Open giangnb opened 2 years ago
Steps to reproduce:
Observed error: System.NullReferenceException: Object reference not set to an instance of an object. at Foundation.Features.Settings.ButtonBackgroundColorSelectionFactory.GetSelections(ExtendedMetadata metadata) in ...\Src\Foundation\Features\Settings\CollectionSettings.cs:line 122 at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.GetSelections(ExtendedMetadata metadata, MetadataStoreModel metadataDTO, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ExtendedMetadata metadata) at EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor) at lambda_method814(Closure , Object , Object[] ) Suggestion: Needs null check or fault-tolerance logic.
System.NullReferenceException: Object reference not set to an instance of an object. at Foundation.Features.Settings.ButtonBackgroundColorSelectionFactory.GetSelections(ExtendedMetadata metadata) in ...\Src\Foundation\Features\Settings\CollectionSettings.cs:line 122 at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.GetSelections(ExtendedMetadata metadata, MetadataStoreModel metadataDTO, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ExtendedMetadata metadata) at EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor) at lambda_method814(Closure , Object , Object[] )
@giangnb Could you please confirm this solves the issue for you (and close this if so)? Thanks!
Steps to reproduce:
Observed error:
System.NullReferenceException: Object reference not set to an instance of an object. at Foundation.Features.Settings.ButtonBackgroundColorSelectionFactory.GetSelections(ExtendedMetadata metadata) in ...\Src\Foundation\Features\Settings\CollectionSettings.cs:line 122 at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.GetSelections(ExtendedMetadata metadata, MetadataStoreModel metadataDTO, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ExtendedMetadata metadata) at EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor) at lambda_method814(Closure , Object , Object[] )
Suggestion: Needs null check or fault-tolerance logic.