Sitecore: Value cannot be null. Parameter name uri

While working on Sitecore off late I have had my content authors complain about the Workbox not working and user was unable to expand a specific folder in the Content Tree.

Here is Sitecore error observed in the logs:

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: uri
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
at Sitecore.Data.ItemUri..ctor(ItemUri uri)
at Sitecore.Data.Items.Item.GetItemUriFromSourceItem()
at Sitecore.Data.Items.Item.get_SourceUri()
at Sitecore.Data.Items.Item.get_Source()
at Sitecore.Data.Fields.Field.GetSourceItem()
at Sitecore.Data.Fields.Field.GetInheritedValue(Boolean allowStandardValue)
at Sitecore.Pipelines.GetFieldValue.GetInheritedValue.Process(GetFieldValueArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Data.Fields.Field.GetValue(Boolean allowStandardValue, Boolean allowDefaultValue, Boolean allowFallbackValue, Boolean allowInheritValue, Boolean allowInnerValue)
at Sitecore.Data.Fields.Field.get_Value()
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetAccessRules(Item item)
at Sitecore.Security.AccessControl.AuthorizationManager.GetAccessRules(ISecurable entity)
at Sitecore.Security.AccessControl.ItemSecurity.GetAccessRules()
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Buckets.Security.AuthenticationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetAccess(Item item, Account account, AccessRight accessRight)
at Sitecore.Security.AccessControl.AuthorizationProvider.GetAccess(ISecurable entity, Account account, AccessRight accessRight)
at Sitecore.Security.AccessControl.AuthorizationManager.GetAccess(ISecurable entity, Account account, AccessRight accessRight)
at Sitecore.Security.AccessControl.AuthorizationManager.IsAllowed(ISecurable entity, AccessRight right, Account account)
at Sitecore.Security.AccessControl.ItemAccess.CanRead()
at Sitecore.Data.Managers.ItemProvider.ApplySecurity(Item item, SecurityCheck securityCheck)
at Sitecore.Data.Managers.PipelineBasedItemProvider.<>c__DisplayClass2f.<GetItem>b__2e()
at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
at Sitecore.Data.Managers.ItemManager.GetItem(ID itemId, Language language, Version version, Database database)
at Sitecore.Shell.Applications.Workbox.WorkboxForm.GetStateItems(WorkflowState state, IWorkflow workflow)
at Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayStates(IWorkflow workflow, XmlControl placeholder)
at Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayWorkflow(IWorkflow workflow)
at Sitecore.Shell.Applications.Workbox.WorkboxForm.Pane_Toggle(String id)

While debugging the Sitecore logs, nothing specific came up apart from few warning flags. My Content Author informed me that he was working on a specific item before the system acted unstable (Coincidently we had a Server Deployment). This made me look further into the item specifically in the /sitecore/admin/dbbrowser.aspx. However, the item could not be selected, nor the folder could be selected for deletion.

This turned the attention to looking into the Master Database. While scanning through all tables for the specific ItemId, it was observed that the SharedFields table had invalid entry for this ItemId and specifically the __Source Item field value.

Here is the SQL Query:

SELECT TOP 100 [Id],[ItemId],[FieldId],[Value],[Created],[Updated]
FROM [CMSSitecoreMaster].[dbo].[SharedFields]
where Fieldid = ’19B597D3-2EDD-4AE2-AEFE-4A94C7F10E31′ and ItemId=’FEA6ED0D-7568-4162-A8EB-08794F3930B0′
order by [Updated] desc

The result showed an invalid entry for the Value field (it was a Chinese text). It should have been ideally something like: sitecore://master/{2C387ADB-2D02-4F6B-8170-961F6F2CAB68} or an empty value.

To fix the invalid entry, the following Update script was executed:

Update [CMSSitecoreMaster].[dbo].[SharedFields] set Value= where FieldId=’19B597D3-2EDD-4AE2-AEFE-4A94C7F10E31′ and ItemId = ‘FEA6ED0D-7568-4162-A8EB-08794F3930B0’

Post CMS server restart, the Workbox started working fine and Content Author was able to expand the issue folder.

Hope this helps!

Feel free to leave a reply here...

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: