Unable to edit Document Library Column: Unknown Error

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.

Now this error does not say much, so I started to look for it in blogs. Now it turns out that someone had faced the exact same issue with oddly enough the exact same name of the column causing the issue. My user had called the column ‘doctype’ . According to the blog post, the name doctype is a reserved word in SharePoint and strangely enough SharePoint does allow you to create a column with that name, but then you will no longer be able to edit it again.

As suggested in that post, I was also able to delete the column using SharePoint Manager 2007 (http://spm.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22762)

My source: http://www.ureader.com/msg/123210106.aspx.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>