3

当我尝试在 Sitecore 9.1 中打开内容编辑器时,它会引发以下错误。这是堆栈跟踪的链接:

堆栈跟踪

请帮我解决这个错误。

你调用的对象是空的。说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例。

源错误:在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:[NullReferenceException: 对象引用未设置为对象的实例。] Sitecore.Buckets.Commands.MakeTemplateBucketable.GetToolTip(CommandContext context, String tooltip) +167 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.FillParamsFromCommand(CommandContext commandContext, RibbonCommandParams ribbonCommandParams) +186 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.GetCommandParameters(Item controlItem, CommandContext commandContext) +78 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderSmallCheckButton(HtmlTextWriter output, Item button, CommandContext commandContext) +99 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderButton(HtmlTextWriter 输出,Item 按钮,CommandContext commandContext) +823 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter 输出,Item 块,CommandContext commandContext) +341 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual, String id) +243 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk( HtmlTextWriter output, Item chunk, CommandContext commandContext, Boolean isContextual) +160 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunks(HtmlTextWriter output, Item strip, CommandContext commandContext, Boolean isContextual) +425 Sitecore.Web.UI.WebControls。 Ribbons.Ribbon.RenderStrips(HtmlTextWriter 输出,项目功能区,布尔 isContextual,ListString visibleStripList)+1612 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderStrips(HtmlTextWriter 输出,项目 defaultRibbon,项目 contextualRibbon,ListString visibleStripList)+161 Sitecore。 Web.UI.WebControls。Ribbons.Ribbon.Render(HtmlTextWriter 输出)+733 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter 编写器,ControlAdapter 适配器)+131 Sitecore.Web.HtmlUtil.RenderControl(Control ctl)+79 Sitecore.Shell.Applications.ContentManager。 ContentEditorForm.UpdateRibbon(Item 文件夹,Boolean isCurrentItemChanged,Boolean showEditor) +559 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() +581 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) +204 [TargetInvocationException:调用的目标已引发异常。] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters,Object[] arguments) +128 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfoculture) +142 Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters,对象 obj) +89 Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +143 System.Web.UI.Control.PreRenderRecursiveInternal() +200 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint ) +7479ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +143 System.Web.UI.Control.PreRenderRecursiveInternal() +200 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) +7479ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +143 System.Web.UI.Control.PreRenderRecursiveInternal() +200 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) +7479

4

1 回答 1

3

刚刚得到同样的错误。当您尝试打开的项目的模板损坏时,这似乎会发生。在您的情况下,您可能破坏了 Home Item,它是在您打开内容编辑器时自动选择的。要进行验证,您可以重命名 DBBrowser 中的主页项(使其不会自动被选中)。之后内容编辑器应该会再次工作,您应该会在快速操作栏中看到断开的链接警告。

最简单的修复方法可能是:

  • 创建一个包含您的主页项目的完整模板层次结构的包
  • 安装那个包

之后,您应该能够重新命名您的主项目并正常启动内容编辑器。

于 2019-03-23T17:31:19.580 回答