I'm trying to create a custom field type inherited from the publishing RichImageField type. I did the following, 1- Created the XML declaration of the column as follows
<FieldTypes>
<FieldType>
<Field Name="TypeName">PublishingImageWithValidation</Field>
<Field Name="ParentType">Image</Field>
<Field Name="TypeDisplayName">Publishing Image With Validation</Field>
<Field Name="TypeShortDescription">Publishing image with validation on width, height, and size</Field>
<Field Name="UserCreatable">TRUE</Field>
<Field Name="FieldTypeClass">
CustomColumnsAndControls.CustomColumns.PublishingImageWithValidation,
$SharePoint.Project.AssemblyFullName$
</Field>
</FieldType>
</FieldTypes>
2- Created the following class
namespace CustomColumnsAndControls.CustomColumns
{
class PublishingImageWithValidation : RichImageField
{
public PublishingImageWithValidation() : base(){}
}
}
After deploying the above, I'm able to see my new field type in the field types list as shown below
But when I try to create a new site column based on it, I get an exception, and here is the exception details from the SharePoint logs
System.MissingMethodException: Constructor on type 'CustomColumnsAndControls.CustomColumns.PublishingImageWithValidation' not found. at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at Microsoft.SharePoint.SPFieldCollection.CreateNewFieldInternal(String typeName, String displayName) at Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save() at Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgu... bd96166d-7e70-40bb-8d0a-64cbc2071ee8
It says "constructor not found"!. The default constructor is there in my class and it's referring the base. I didn't find any other constructors in the parent type to refer to.
What could be the problem?