Sitecore - Value Cannot Be Null Parameter Name Key
After upgrading the solution to Sitecore version 10.2, I have started facing the Value that cannot be a null error. More details log and error you can find below:
Exception: System.ArgumentNullException | |
Message: Value cannot be null. | |
Parameter name: key | |
Source: mscorlib | |
at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValue(TKey key, TValue& value) | |
at Sitecore.Caching.Generics.Cache`1.InnerBox.DoGetEntry(TKey key, Boolean updateAccessed) | |
at Sitecore.Caching.Generics.Cache`1.GetValue(TKey key) | |
at Sitecore.Caching.Generics.Cache`1.ContainsKey(TKey key) | |
at Sitecore.Data.DataProviders.Sql.SqlDataProvider.EnsureChildrenPrefetched(ID parentId, IDList childIds) | |
at Sitecore.Data.DataProviders.Sql.SqlDataProvider.GetChildIDs(ItemDefinition itemDefinition, CallContext context) | |
at Sitecore.Data.DataProviders.CompositeDataProvider.<DoGetChildIDs>d__94.MoveNext() | |
at Sitecore.Common.EnumerableExtensions.ForEach[T](IEnumerable`1 sequence, Action`1 action) | |
at Sitecore.Data.DataProviders.CompositeDataProvider.GetChildIDs(ItemDefinition itemDefinition, CallContext context) | |
at Sitecore.Data.DataProviders.DataProvider.GetChildIDs(ItemDefinition item, CallContext context, DataProviderCollection providers) | |
at Sitecore.Data.DataSource.GetChildIDs(ID itemID) | |
at Sitecore.Nexus.Data.DataCommands.GetChildrenCommand.Execute(Item item) | |
at Sitecore.Data.Engines.EngineCommand`2.Execute() | |
at Sitecore.Data.Managers.ItemProvider.GetChildren(Item item, ChildListOptions options) | |
at Sitecore.Data.Managers.ItemProvider.GetChildren(Item item, SecurityCheck securityCheck, ChildListOptions options) | |
at Sitecore.Collections.ChildList.Populate(ChildListOptions options) | |
at Sitecore.Data.Items.Item.get_Children() | |
at Sitecore.Data.Fields.DefaultFieldTypeManager.GetFieldTypeIds(SafeDictionary`2 paths, Item item) | |
at Sitecore.Data.Fields.DefaultFieldTypeManager.GetFieldTypeIds(SafeDictionary`2 paths, Item item) | |
at Sitecore.Data.Fields.DefaultFieldTypeManager.LoadFieldTypeIds() | |
at Sitecore.Data.Fields.DefaultFieldTypeManager.GetFieldTypeItem(String fieldType) | |
at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.GetFieldType(Field itemField) | |
at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderField(Control parent, Field field, Boolean readOnly) | |
at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSection(Section section, Control parent, Boolean readOnly) | |
at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderSections(Control parent, Sections sections, Boolean readOnly) | |
at (Object , Object ) | |
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) | |
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) | |
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) | |
at Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs args, Control parent) | |
at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item item, Item root, Control editorsContainer, Boolean showEditor) | |
at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item folder, Item root, Boolean showEditor) | |
at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() | |
at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) |
After investigating this issue, I have found that this is a known issue in Sitecore and Sitecore described the solution here Retrieving the child items of resource items is not thread-safe.
But as we were on Sitecore XM instead of the XP version, so will it work for XM? Yes, the cumulative hotfix works for XM as well, so do not be confused with it.
Note: This hotfix is a Cumulative hotfix and does not use the installation wizard to install it. Such hotfixes are not intended to be installed using the Installation wizard.
Instead, you need to refer to the following articles describing by Sitecore, how to install the hotfixes for OnPrem and PaaS instances:
But I have used another approach to install it with Sitecore instance OnPrem and PaaS instance that is: Install Cumulative Hotfix.
Note:
As per Sitecore official article Sitecore Managed Cloud Standard – service aspects and embedded operations https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0133931:
Sitecore Support is responsible for supplying patches or hotfixes for Sitecore product bugs reported by a customer according to the scope of services https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0463549.
The customer is ultimately responsible for deploying patches or hotfixes to a production solution using any Azure Web Apps deployment process.
You can find more information about Sitecore patches and hotfixes here: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0077333
Happy Sitecoreing 😊
Comments
Post a Comment