SharePoint 2010 Data Type Errors

So, having being tasked with creating a good deal of Content Types recently, I thought I’d be clever and write some PowerShell Scripts to do them for me.

Everything was going well until I ran a script that had an incorrect Field Type specified. Or, more accurately I made a typo when specifying a DateTime column. The Field Type is the Column type that you get to choose when creating a new column. I didn’t spot the problem until I tried checking on the outcome via Galleries à Site Columns and saw this error: –

I traced the log message down, which provided the following information: –

“Microsoft.SharePoint.SPException: Field type Date is not installed properly. Go to the list settings page to delete this field. at Microsoft.SharePoint.SPFieldCollection.CreateSPFieldFromSafeArray(Int32 index) at Microsoft.SharePoint.SPFieldCollection.CreateSPField(Int32 ifld) at Microsoft.SharePoint.SPFieldCollection.EnsureSPField(Int32 index) at Microsoft.SharePoint.SPFieldCollection.ItemAtIndex(Int32 iIndex) at Microsoft.SharePoint.ApplicationPages.FieldListRenderer.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveIn… ”

As my errant column wasn’t yet attached to a list, I wasn’t able to log into any list settings to delete the column. My next port of call was SPD. However, upon trying this, I was hit with the following error: –

Not being able to get anywhere via the GUI, I thought I’d take a look at the Hive\14 files where SharePoint stores its Field Types. The SharePoint field times will typically be stored in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML\fldtypes.xml

Looking here, the definition for DateTime looked intact. For reference, the DateTime definition starts on line 346.

This meant that having made the error via scripting, I should be able to fix it via scripting. I’ll post back here if I work it out!


3 thoughts on “SharePoint 2010 Data Type Errors

  1. I guess he never found it. My error is for type ‘Client’ which was custom manufactured. In my case that word does not appear at all in fldtypes.xml, which I assume is the problem.

    My question, as I am trying to follow the instruction in the error, is, what list hold the site columns. I would like to go look at that list or collection.

  2. Hi Mardukes,

    The quickest way around this for me was to use a Script to delete it, upon which I recreated it correctly. I never saw where the custom columns were added too but it fixed the problem.

    I can’t recall the link / script off-hand but when I’ve retrieved it, I’ll post it here for you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s