Pages Library不能显示Library Settings页面的错误处理

找了好久原因的一个错误,就是当你打开Pages Library的Library Settings页面时提示unexpected错误,如果打开web.config的详细错误信息或查看ULS logs的时候会看到如下的错误信息:

SharePoint Foundation Runtime tkau Unexpected System.Web.HttpException: The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource. A control with ID 'topSiteMap' could not be found.  

at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource()    
at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource()    
at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e)    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Control.LoadRecursive()    
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Web Content Management Publishing 8vzh Unexpected PortalSiteMapProvider was unable to fetch current node, request URL: /_layouts/listedit.aspx, message: Value cannot be null.  Parameter name: key, stack trace:    

at System.Web.SiteMapNode..ctor(SiteMapProvider provider, String key, String url, String title, String description, IList roles, NameValueCollection attributes, NameValueCollection explicitResourceKeys, String implicitResourceKey)    
at System.Web.SiteMapNode..ctor(SiteMapProvider provider, String key, String url, String title, String description)    
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode..ctor(PortalSiteMapProvider provider, PortalWebSiteMapNode webNode, String key, NodeTypes type, String url, String title, String description)    
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_CurrentNode()

DelegateControl: Exception thrown while adding control 'Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch': Object reference not set to an instance of an object.

错误原因:因为我有使用自定义Master Page,并且在其上添加了Form Field,例如: 

<SharePointWebControls:UserField ID="123ABC" ControlMode="Display" CssClass="someClass" FieldName="GUID" runat="server" ></SharePointWebControls:UserField>

 

解决办法:把Form Field控件从Master Page移走,或者考虑使用Page Layouts或Resuable Content Field控件。我的处理是把Form Field移到了Page Layouts。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值