由于空引用异常,Sitecore的“链接”按钮不起作用

时间:2016-09-07 16:23:29

标签: sitecore sitecore8 sitecore8.1

我正在尝试查看某个项目的关联项目。我在客户端的内容管理服务器上执行此操作。当我点击导航 - >链接,没有任何反应。我在JavaScript控制台中收到此错误:

  

http://sitename.local/sitecore/shell/default.aspx?xmlcontrol=Gallery.Links& ...解DE&安培; VS = 1&安培; DB =主&安培; sc_content =主&安培; ShowEditor = 1&安培; Ribbon.RenderTabs =真

     

无法加载资源:服务器响应状态为500(内部服务器错误)

以下是我在Sitecore日志中看到的内容:

38424 19:09:30 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
   at Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Nested Exception

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: ownerItem
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
   at Sitecore.Data.Fields.Field..ctor(ID fieldID, Item ownerItem)
   at Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.GetLinkTooltip(Item reference, ItemLink link)
   at Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.RenderReferences(StringBuilder result, List`1 references)
   at Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.OnLoad(EventArgs e)

创建项目字段时,ownerItem参数似乎为null。

这种情况发生在几个不同的项目上 - 例如。模板和子布局。

导致此问题的原因是什么?如何解决?

1 个答案:

答案 0 :(得分:7)

此问题已在Sitecore中注册为错误,并且已在Sitecore 8.1更新2中修复,作为从7.2更新6合并的修补程序的一部分: “包括Sitecore 7.2 update-6中的所有相关修补程序”

https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/Sitecore%2081/Sitecore%20Experience%20Platform%2081%20Update2/Release%20Notes

“452241:如果存在跨数据库链接,则链接对话框将失败” https://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%207/ReleaseNotes/ChangeLog.aspx

要修复Sitecore 8.1 update 1中的问题,请安装以下修补程序:

  1. 将附加的Sitecore.Support.452241.dll文件放入解决方案的bin文件夹中。
  2. 在Website \ sitecore \ shell \ Applications \ Content Manager \ Galleries \ Links \ Gallery Links.xml对话框中替换以下字符串:
  3.      <CodeBeside Type="Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm,Sitecore.Client"/>
    

    使用新的:

         <CodeBeside Type="Sitecore.Support.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm,Sitecore.Support.452241"/>
    

    您可以在此处找到该文件的链接:https://www.dropbox.com/s/l36zqhwjtahl4q2/Sitecore.Support.452241.dll?dl=0