“Unable to display this Web Part” after XSLT Customization

The following applies to SharePoint 2013, 2016 and SharePoint Online.


The Error

“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.”


The above error shows up in SharePoint 2013 and later when doing multi-level grouping with Data Form Web Parts. With the removal of many of the design features from SharePoint Designer 2013, I doubt there are too many people creating new XSLT customization. But if you are upgrading from 2010 or trying to implement a 2010 style customization then you many run into this error.


The Cause and the Fix

If you dig into the error logs you will find that this is reported as “Error while executing web part: System.StackOverflowException”. Turns out though that it is a timeout of the XSLT parser and has been around for quite a while. The fix is pretty easy, if you are on premises, just run a tiny PowerShell script from the SharePoint Management Shell.


$farm = Get-SPFarm
$farm.XsltTransformTimeOut = 10

Some of the articles say to increase it from the default of 1 second to 5 seconds. In my test environment I typically needed to increase it to 10 seconds. If you monitor the CPU on the server you will see that at least on lab-type virtual machines that a page load where you have this issue does put quite a load on the CPU.

SharePoint Online?  No joy for you! It appears that the default is 1 second, and you can’t change it.


There’s been a number of articles on the topic, mostly in the SP 2010 world:



and many more: http://www.bing.com/search?q=xslttransformtimeout+sharepoint



No comments:

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.