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):
- SP2010/Wiki Pages: “Sys.WebForms.PageRequestManagerServerErrorException: An unexpected error occured.” when editing a page
- Sys.WebForms.PageRequestManagerServerException error when editing 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.
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.
Great tip – legendary!
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.
AWESOME!! PERFECT FIX FOR ME
Rock and roll. May I know why this is happening
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++++