1

We have a SharePoint 2007 solution with a custom Field Type. We have now upgraded to 2010 and find when deploying a ContentType with a reference to the custom field type we get the following error when activating the feature:

Enable-SPFeature : Constructor on type 'xxx' not found.
  At sharepoint.ps1:131 char:18
  + Enable-SPFeature <<<<  -Identity $featureName -url $url -force:$force
  + CategoryInfo : InvalidData: (Microsoft.Share...etEnableFeature:SPCmdletEnableFeature)

The FieldTypeClass is in the GAC and correct. It hasn't changed since the upgrade. I tried copying the custom fldtypes_xxx.xml to the 14 hive, but get the same error.

The SafeControl entry exists in the web.config. Any ideas why I might be getting this error?

1

It turns out Sharepoint 2007 is pretty relaxed about how you define your content types and field types, but 2010 is not so forgiving.

We had an XML file per content type, and included field type definitions referenced by the content type directly above each in the same file.

Splitting the field type definitions out into a single XML file and removing duplications resolved our issues.

  • In my case it was indeed one of two constructors (of SPFieldText) missing. Seems like SP 2007 didn't use it. Adding the constructor fixed the error. – Heinrich Ulbricht Jun 23 '14 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.