+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Custom Module - Delete Record Error

Custom Module - Delete Record Error

6 posts, 2 answered
  1. John Dentler
    John Dentler avatar
    12 posts
    Registered:
    23 Apr 2010
    22 Sep 2010
    Link to this post
    Hi Guys,

    Were getting an error with a custom module that we haven't seen before in our other custom modules. This module has been created exactly the same as our existing custom modules. The module is used for toggling features. The only property we have on it so far is a check box to support gift wrapping or not.

    When we try to delete the one record that we have created, we get the error which is attached to the post. The exception doesnt break anywhere in VS debug mode.

    Any thoughts?

    Thanks,

    JD

    Some entries from web.config:

                    <add key="ActiveFeatures.GiftWrap" valueType="Boolean" visible="True" searchable="True" sortable="True" defaultValue="" mandatory="True" />
      
    <add name="ActiveFeatures" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="-" visible="False" defaultMetaField="GiftWrap" securityProviderName="" allowVersioning="True" applicationName="/ActiveFeatures" versioningProviderName="" allowComments="false" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data" />
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Sep 2010
    Link to this post
    Hi John Dentler,

    It looks like that this is an implementation for a module prior Sitefinity 3.6, because ControlPanel and ObjectDataSource is not used in 3.6 or 3.7 editions.

    The error is thrown, because the defaultMetaField  -GiftWrap could not be cast. GiftWrap type is Boolean and inside dataSource_Deleting  we cast it to string. Please use metakey of type "ShortText"  or "LongText" as a defaultMetaField.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. John Dentler
    John Dentler avatar
    12 posts
    Registered:
    23 Apr 2010
    22 Sep 2010
    Link to this post
    Thanks, Ivan.

    Yes, this is for a client that uses 3.2. So, to be clear, we are not able to use check boxes in custom modules, and I need to use short or long text instead, correct?

    Respect,

    JD
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Sep 2010
    Link to this post
    Hello John Dentler,

    No, you can use checkbox in a custom module. You cannot use metakey of type Boolean as defaultMetaField.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. John Dentler
    John Dentler avatar
    12 posts
    Registered:
    23 Apr 2010
    22 Sep 2010
    Link to this post
    Ah, OK. I see what you mean. I'll give it a go and report back. Thanks!
  6. John Dentler
    John Dentler avatar
    12 posts
    Registered:
    23 Apr 2010
    22 Sep 2010
    Link to this post
    This got it working for me:

    defaultMetaField=""

    Thanks again, Ivan =)
Register for webinar
6 posts, 2 answered