Translate

Tuesday, May 9, 2017

December '16 Cumulative Update for SharePoint 2013 Issue - Data View Web Parts Stopped working without workaround

The SharePoint Data View Web Part in On Prem environment is not working as expected after the Dec '16 CU is installed. This is fixed in April '17 CU. So, after you patch your SP 2013 environment with Dec '16 CU you would see your DVWP breaking. Below are the error details and workaround available.

If you add a DVWP in your page you would see an error like below.

Error On the Page :
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID: -------

Error in ULS Log :
If you search the ULS log with the correlation id you will see an error like below.

Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.   
 at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteSelect(DataSourceSelectArguments selectArguments, String aggregateString, Boolean wantReturn, BaseXsltListWebPart webpart, SPListItem& listItem, SPListItemCollection& listItems, String[]& fieldList)   
 at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal()   
 at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator()   
 at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathNavigator(String viewPath)   
 at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)

Workaround :

Open the page in SharePoint Designer and remove the below tags from the data source.

<SelectParameters><WebPartPages:DataFormParameter ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="Project Study" Name="ListName"></WebPartPages:DataFormParameter><asp:Parameter DefaultValue="0" Name="StartRowIndex"></asp:Parameter><asp:Parameter DefaultValue="0" Name="nextpagedata"></asp:Parameter><asp:Parameter DefaultValue="1" Name="MaximumRows"></asp:Parameter>
OR
<asp:Parameter Name="StartRowIndex" DefaultValue="0"/><asp:Parameter Name="nextpagedata" DefaultValue="0"/>


Observation :
The issue is not reproducible in environments where Dec '16 CU is unavailable. I have tested this.

Solution :

MS has confirmed that it is a known bug. The issue is fixed in April '17 CU, but I haven't installed and tested this to confirm. Patch installation requires planning, approval and downtime which is time consuming. Once I test this, I will update again to confirm.