Sitecore:值不能为null。参数名称:uri

Sitecore:值不能为null。参数名称:uri,sitecore,uri,sitecore8,Sitecore,Uri,Sitecore8,我正在本地文件中编辑占位符项 当我收到此错误时,Sitecore 8.1(版本151207)实例。现在我无法编辑、删除或重置它(或它的父文件夹)。我也无法在内容编辑器中读取该项目,因为单击父文件夹时会弹出错误。我曾尝试通过代码和PowerShell命令从内容编辑器中删除/编辑它及其父文件夹,但始终显示相同的错误 我还尝试用备份副本替换我的配置和bin文件夹,清除缓存,重新启动IIS和应用程序池,但没有任何效果 我完全卡住了。有人知道如何解决这个问题吗 编辑: 日志中的完整错误为: Excepti

我正在本地文件中编辑占位符项 当我收到此错误时,Sitecore 8.1(版本151207)实例。现在我无法编辑、删除或重置它(或它的父文件夹)。我也无法在内容编辑器中读取该项目,因为单击父文件夹时会弹出错误。我曾尝试通过代码和PowerShell命令从内容编辑器中删除/编辑它及其父文件夹,但始终显示相同的错误

我还尝试用备份副本替换我的配置和bin文件夹,清除缓存,重新启动IIS和应用程序池,但没有任何效果

我完全卡住了。有人知道如何解决这个问题吗

编辑: 日志中的完整错误为:

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: uri
Source: Sitecore.Kernel

您可以尝试使用DB Browser
/sitecore/admin/dbbrowser.aspx
,也可以使用此工具删除项目


如果此DB Browser管理工具失败,那么我很好奇主数据库中有什么,直接在sql中检查使此项特别的不是选项。

发生您提供的异常,因为您的项中的
\u源项-{19B597D3-2EDD-4AE2-AEFE-4A94C7F10E31}
字段中有非空的无效值<代码>\源项负责存储克隆项的原始项URI

我不知道您是如何做到这一点的,因为在
saveItem
管道中有一个处理器
ValidateCloneSourceModifications
,用于防止保存带有无效
\u源项的项目

我可以通过更改DB中的字段值来重现您的异常

如何修复:

  • 在master DB->SharedFields表中找到断开的字段。
    字段ID
    是“19B597D3-2EDD-4AE2-AEFE-4A94C7F10E31”
  • 修好它。它应该类似于
    sitecore://master/{AE76A034-9491-4B83-99F5-39F227D6FB59}
    ,其中ID是原始项ID。您也可以将
    ''
    设置为值,但它将删除对原始项的绑定
  • 清除缓存

  • 这一定会有帮助。

    祝贺您就堆栈溢出问题提出了1400万个问题:)日志中是否有更详细的错误?您是说占位符项在演示详细信息中?能否尝试将原始值设置为选中的
    并查看是否可以更新该项?否,它是实际的占位符项。这很糟糕,因为现在每个使用占位符的页面都被破坏了。谢谢你的回复!我在dbbrowser中也会遇到同样的错误,但我可以比在contenteditor中更进一步……这是masterdb。在web数据库中也可以。我能看到的唯一区别是,master one的“\u Source Item”和“\u Source”字段中没有任何内容,而web one的字段则是具体的“”,如果没有null,则它包含空字符串或空格。对于空字符串,由于内部Sitecore检查,您将不会收到异常,因此“\uu源项”字段中有空格,这是一个无效值。看看我的答案。谢谢你,谢谢!我想我可能可以在数据库中编辑它,但找不到正确的表。我能够编辑它并修复该问题。
    
    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.Pipelines.ItemProvider.GetItem.GetLanguageFallbackItem.IsItemFallbackEnabled(Item item)
       at Sitecore.Pipelines.ItemProvider.GetItem.GetLanguageFallbackItem.Process(GetItemArgs args)
       at (Object , Object[] )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       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, SecurityCheck securityCheck)
       at Sitecore.Nexus.Data.DataCommands.GetChildrenCommand.Execute(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.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
       at Sitecore.Data.Managers.PipelineBasedItemProvider.GetChildren(Item item, SecurityCheck securityCheck)
       at Sitecore.Collections.ChildList.Populate(ChildListOptions options)
       at Sitecore.Shell.Framework.Pipelines.DeleteItems.GetItemClones(Item item, Boolean processChildren)
       at Sitecore.Shell.Framework.Pipelines.DeleteItems.GetItemClones(Item item, Boolean processChildren)
       at Sitecore.Shell.Framework.Pipelines.DeleteItems.GetItemClones(List`1 items)
       at Sitecore.Shell.Framework.Pipelines.DeleteItems.GetCheckCloneLinksMessage(List`1 items)
       at Sitecore.Shell.Framework.Pipelines.DeleteItems.CheckCloneLinks(ClientPipelineArgs args)