I have a SharePointWebControls:TextField
control on the page. It's tied to a field that has been defined as normal in the xml (I've gone through this with a fine tooth comb so I'm 99.999% sure the definition and fieldref is all in order). I've checked in site settings and the field appears fine on the content type just fine. I've removed and added the field via site settings (this IS a new content type field), but still no luck; the problem is when it comes to saving & closing a page, on attempting to validate it, SharePoint provides the following error:
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.SharePoint.WebControls.BaseChoiceField.Validate() +98
System.Web.UI.Page.Validate() +116
Microsoft.SharePoint.WebControls.SPPageStateControl.EnsureItemSavedIfEditMode(Boolean forceSave, String overwriteCommandHandler, String discardChangesCommandHandler) +169
This error isn't shown when I remove the mentioned TextField control from the page, and the following article backs up the idea that it is in fact this control causing the problem:
http://seansharepoint.blogspot.co.uk/2009/09/microsoftsharepointwebcontrolsbasechoic.html