Wednesday, September 9, 2009

Microsoft.SharePoint.WebControls.BaseChoiceField.Validate()

When you see this error, it's likely due to the fact that the Page Layout you're using has controls on it that are not in the Content Type that you're tying it to:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.SharePoint.WebControls.BaseChoiceField.Validate() +501
System.Web.UI.Page.Validate() +141
Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.ConsoleAction.EnsureItemSavedIfEditMode(Boolean forceSave) +200
Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.PublishAction.RaisePostBackEvent(String eventArgument) +167
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

1 comment:

Kjell-Sverre Jerijærvi said...

Thank you, just the solution to my problem.