SharePoint error when editing a wiki page: Sys.WebForms.PageRequestManagerServerException: An unexpected error has occurred

I’ve had an ongoing problem where some users, when clicking the Edit Page button on a SharePoint 2010 wiki page, get the following error:

Sys.WebForms.PageRequestManagerServerException: An unexpected error has occurred

I found a couple blog posts about this suggesting a permissions issue (which made sense, as users in other groups could successfully edit pages):

Both sites suggested that an Access Denied message should appear in the ULS logs. However, no such message appeared in relation to my errors.

ULS entry:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SharePoint.Publishing.WebControls.MediaWebPart.get_WebPartAdderId()
at Microsoft.SharePoint.Publishing.WebControls.InsertMediaRibbonButton.RegisterRequiredScripts()
at Microsoft.SharePoint.Publishing.WebControls.InsertMediaRibbonButton.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint... 1317dffd-b607-4f1c-9145-b4adc1d364ba

The MediaWebPart. SharePoint 2010 added a video/audio insertion feature on the ribbon, and the error occurred when trying to add the button.

It turns out, the permissions to the Web Part Gallery had been customized (i.e. broken inheritance from the parent site collection), and some groups who had permission to edit wiki pages did not have read permission for the Web Part Gallery (and, consequently, the MediaWebPart). Adding Restricted Read access for the group in question (to either the MediaWebPart or to the Web Part Gallery) solved this problem.

I don’t imagine this will be a common problem for other people, but I thought it worth mentioning.

7 thoughts on “SharePoint error when editing a wiki page: Sys.WebForms.PageRequestManagerServerException: An unexpected error has occurred”

  1. OMG!!! Thank you so much. This solved my problem. I spent almost 2 weeks working on this and never thought to look at the webpart gallery. The tool I use to show permissions never even showed it as having broken inheritance. So much for using expensive 3rd-party admin tools.

  2. This happened to me. The Publishing Infrastructure site collection feature had been turned on, which creates several additional security groups (Approvers, Designers, Hierarchy Managers, Restricted Readers, and Style Resource Readers). The site owner, not knowing any better, deleted all of them.

    To fix, I simply turned off the feature, then turned it back on. The groups were re-created and the user was able to edit the home page without error.

  3. This solved our problem as well. Not sure why this group is no longer inheriting permissions… will have to look into that further.

    Thanks!! A++++

Leave a Reply

Your email address will not be published.