Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISettingsService fails when none of SiteDefinition.SiteUrl is valid #119

Open
giangnb opened this issue Feb 16, 2022 · 1 comment
Open

Comments

@giangnb
Copy link

giangnb commented Feb 16, 2022

Steps to reproduce:

  1. Set up site, runs at localhost:5000 (default)
  2. Go to CMS admin, manage websites and change all host name to a non-existing domain, except wildcard host
  3. Back to edit mode at localhost:5000

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.

image

@daniel-isaacs
Copy link

@giangnb Could you please confirm this solves the issue for you (and close this if so)? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants