It has been a while since my last post and since then, I encountered some interesting issues, worth writing about. This one amazed me.
One of our users complained that he was unable to edit a standard choice field that he just created in a document library. Whenever he tried to edit the filed he got the dreadfull “Unknown Error” from SharePoint.
A little research and some adjusting of diagnostics logging when reproducing the error, showed the following error in the ULS logs:
Application error when access /_layouts/FldEdit.aspx, Error=Object reference not set to an instance of an object.
at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.get_ContentTypeId()
at ASP._layouts_fldedit_aspx.__Render__control433(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Exception Type: System.NullReferenceException Exception Message: Object reference not set to an instance of an object.