SharePoint 2013 – One or more field types are not installed properly

One or more field types are not installed properly

Today I got this error

Microsoft.SharePoint.SPException: One or more field types are not installed properly. Go to the list settings page to delete these fields. —> System.Runtime.InteropServices.COMException: One or more field types are not installed properly. Go to the list settings page to delete these fields.0x81020014 at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) — End of inner exception stack trace — at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) at Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() at Microsoft.SharePoint.SPListItemCollection.get_Count() at MyCorp.SharePoint.Branding.LinksControl.Page_Load(Object sender, EventArgs e)

I was running the following code within a User Control

SPQuery query = new SPQuery();

query.Query = “<Where><Eq><FieldRef Name=’LinkSection’ /><Value Type=’Text’>” + “Top Navigation” + “</Value></Eq></Where>”;

query.ViewFields = “<FieldRef Name=’LinksUrl’ /><FieldRef Name=’Title’ />”;

SPListItemCollection items = list.GetItems(query);

if (items.Count > 0 )

{

}

The items.Count was generating the above error. Aha, something wrong with the list?! Wrong!!

The Solution

Something wrong with the query.

Name=’LinkSection’

My custom field was called LinksSection. So a simple typo and yet another half an hour gone as the error was pointing me in the wrong direction.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. You can contact me using contact@sharepains.com

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading