Sharepoint2013:日期控件报错

本文介绍在SharePoint中日期控件出现Object reference not set to an instance of an object异常的原因及解决办法。该问题仅在特定路径的网站集合中出现,通过创建根网站集合可以有效解决。

1 问题

1> 在sharepoint中的,日期控件(DateTimeControl),日期过滤控件(Date Filter)和SPListViewFilter等包含日期组件的控件,在特定情况下会报以下的错误

2> 我们查看下具体错误信息是:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.SharePoint.Utilities.SPUtility.GetThemedImageUrl(String originalUrl, String themeKey) +199
   Microsoft.SharePoint.WebControls.DatePicker..ctor() +1460
   Microsoft.SharePoint.WebControls.SPDatePickerControl.InitDatePicker() +44
   Microsoft.SharePoint.WebControls.SPDatePickerControl.set_MinJDay(Int32 value) +25
   Microsoft.SharePoint.ApplicationPages.DatePickerFrame.Page_Load(Object sender, EventArgs e) +1708
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.LoadRecursive() +94
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2935

 

 

2 解决方案

以上错误只有在具特殊的路径的网站集合才会发现(如:http://localhost:8088/sites/TEST/

在当前的端口下创建一个根网站集合即可解决问题(如 http://localhost:8088)

 

转载于:https://www.cnblogs.com/dataadapter/p/4561052.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值