【问题标题】:Sitecore Content Editor throws : Server Error in '/' Application errorSitecore 内容编辑器抛出:“/”应用程序错误中的服务器错误
【发布时间】:2019-06-19 11:55:44
【问题描述】:

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

请帮我解决这个错误。

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

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

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

堆栈跟踪: [NullReferenceException:对象引用未设置为对象的实例。] Sitecore.Buckets.Commands.MakeTemplateBucketable.GetToolTip(CommandContext 上下文,字符串工具提示)+167 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.FillParamsFromCommand(CommandContext commandContext,RibbonCommandParamsribbonCommandParams)+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 输出,项目按钮,CommandContext commandContext)+823 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter 输出,项目块,CommandContext commandContext)+341 Sitecore.Web.UI.WebControls.Ribbons.Ribbon.RenderChunk(HtmlTextWriter 输出,项目块,CommandContext commandContext,布尔 isContextual,字符串 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 输出,项目条,CommandContext commandContext,布尔 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(项目文件夹,布尔 isCurrentItemChanged,布尔 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[] 参数, CultureInfo 文化) +142 Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo 方法, Object[] 参数, Object 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) +7479

【问题讨论】:

标签: asp.net-mvc content-management-system sitecore9


【解决方案1】:

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

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

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

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

【讨论】:

    猜你喜欢
    • 2011-03-05
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2015-10-30
    • 2017-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多