I am trying to display content in a formatted, custom page in SP10.

I created a content type, I'll call BobType, which uses "Page" as the parent (actually, i've tried it with "Enterprise Wiki Page" as well) and has one added field, Description.

Using SPD, I created a page layout based on Bobtype called BobTypeLayout which contains the Name, Description, Rollup Image, and Comments fields. I then checked it in and approved the file.

Next, I went to site administration | site libraries and lists | customize "Pages" and added BobType to the allowed list. I made it the default type.

Now, I head back to the main site and select site actions | new page and create BobTest. It returns the correct form for creating a new BobType. So far, everything seems to be going great.

After filling in the form with random data - about you know who - I click save and get the infamous, "An unexpected error has occurred."

ULS viewer on the server shows that I'm getting:

System.NullReferenceException: Object reference not set to an instance of an object.   
 at Microsoft.SharePoint.WebPartPages.WikiPageWebPartSaver.SaveWebPartsInRichText(SPWebPartManager wpmgr)    
 at Microsoft.SharePoint.WebControls.SPPageStateControl.EnsureItemSavedIfEditMode(Boolean forceSave, String overwriteCommandHandler, String discardChangesCommandHandler)    
 at Microsoft.SharePoint.WebControls.SaveAndStopEditCommandHandler.RaisePostBackEvent(String eventArgument)    
 at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageSaveAndStopEditHandler.BaseRaisePostBackEvent(String eventArgument)    
 at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageStateControl.RaisePostBackEventForPageRouting(String eventArgument, SPRibbonCommandHandler control, RaisePostBackEventDelegate raisePostBackEventDelegate)    
 at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageSaveAndStopEditHandler.RaisePostBackEvent(String eventArgument)    
 at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)    
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I've been tweaking the procedure randomly for a couple hours but seem to get stuck at the same point each time. The only requred field on the content type is, Name, and it has a value.

Any suggestions on how to troubleshoot? I can provide more info if necessary.

Thanks in advance.

  • The stack trace seems to reference the Wiki Pahe content type... Is that the case? Was the error any different when you used the "Page" content type as parent?
    – SPArcheon
    Jan 11, 2012 at 7:57
  • Yes, the error was the same with Page. I tried a few options and did not remember where I left off.
    – bob
    Jan 11, 2012 at 17:18
  • I have same issue. Any body can help me
    – LazyCatIT
    Mar 14, 2016 at 2:45

1 Answer 1


I find a link: http://spfarm.blogspot.com/2011/05/sharepoint-object-reference-not-set-to.html.

It's resolved my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.