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

Forums / Bugs & Issues / Create new Event throw an error

Create new Event throw an error

16 posts, 0 answered
  1. Mostafa
    Mostafa avatar
    14 posts
    Registered:
    13 Jul 2010
    20 Jul 2010
    Link to this post
    Hi All,

    I have a site finity site with version 3.7, when i'm trying to create a new event i'm getting this error:

    Meta field control must implement at least ITextControl.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.InvalidCastException: Meta field control must implement at least ITextControl.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [InvalidCastException: Meta field control must implement at least ITextControl.]
       Telerik.Cms.Engine.WebControls.ContentMetaFields.SetTextControl(Control ctrl, Object data) +89
       Telerik.Cms.Engine.WebControls.ContentMetaFields.CreateChildControls() +1675
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.WebControls.CompositeControl.get_Controls() +15
       Telerik.Framework.Web.ControlTraverser.GetBreadthFirst(Boolean isRecursionCall) +65
       Telerik.Framework.Web.ControlTraverser.GetBreadthFirst(Boolean isRecursionCall) +171
       Telerik.Framework.Web.ControlTraverser.GetBreadthFirst(Boolean isRecursionCall) +171
       Telerik.Framework.Web.ControlTraverser.Next() +33
       Telerik.Framework.Web.ControlTraverser.MoveNext() +5
       Telerik.Cms.Web.UI.GenericContainer.FindTypedControl(String id, Type searchType, TraverseMethod method) +185
       Telerik.Cms.Web.UI.GenericContainer.GetControl(String id, Boolean required, TraverseMethod method) +91
       Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.get_TagsControl() +41
       Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.SetContentForm(IContent cnt) +1947
       Telerik.Events.WebControls.Admin.EventsItemEdit.SetContentForm(IContent cnt) +30
       Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.InitializeControls(Control viewContainer) +32
       Telerik.Cms.Web.UI.ViewModeControl`1.CreateChildControls() +101
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


    Is there any fix for this problem that i can do on the project? since it seems is a template problem ?!!

    Thanks.
    Mostafa Elzoghbi
    http://moustafa-arafa.blogspot.com

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jul 2010
    Link to this post
    Hello Mostafa,

    Most probably in your EventsNewsView template you have added a custom control inside ContentMetaFields section that does not implements ITextControl control interface. You should use a control that implements one of the following interfaces

    • ITextControl
    • ICheckBoxControl
    • RadDateInput
    • RadDatePicker

    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
  3. Mostafa
    Mostafa avatar
    14 posts
    Registered:
    13 Jul 2010
    20 Jul 2010
    Link to this post
    I didn't add or customize this page, it comes with SiteFinity 3.7 that i have ? but i was testing the system and i got this error ? any  help on how to fix it ?

    Thanks.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jul 2010
    Link to this post
    Hello Mostafa,

    This is not the default behavior of the module. If you have not touched the template, most probably you have build the project in . NET Framework 4.0

    Best wishes,
    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
  5. Mostafa
    Mostafa avatar
    14 posts
    Registered:
    13 Jul 2010
    20 Jul 2010
    Link to this post
    I'm building on .NET Framework 3.5 ?! what is then the default behavior ?!
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Jul 2010
    Link to this post
    Hello Mostafa,

    Open a support request or bug report and send the project and its database to us. You could take a look at demo.sitefinity.com to see the default behavior.

    Greetings,
    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
  7. Mostafa
    Mostafa avatar
    14 posts
    Registered:
    13 Jul 2010
    21 Jul 2010
    Link to this post
    I have noticed that it is a template problem, the same template is working with VS2008

    I'm running my project using VS 2010 with the same framework 3.5 as a target.

    Any ideas why this is happening !!?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Jul 2010
    Link to this post
    Hi Mostafa,

    I will get back to you in the other thread you have opened. It looks like the issues are related.

    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
  9. Mostafa
    Mostafa avatar
    14 posts
    Registered:
    13 Jul 2010
    21 Jul 2010
    Link to this post
    Yes. waiting for your support.

    Thanks a lot.
  10. Gratian
    Gratian avatar
    9 posts
    Registered:
    05 Nov 2010
    14 Jan 2011
    Link to this post
    ! Update
    I just figured out that in order to use RadDatePicker the meta field format in web.config MUST be datetime and in this manner i was also able to use RadTimePicker.
    Great :)
    --------------------------
    Hi Ivan,
    I am using RadDateTimePicker which extends RadDatePicker and i get the same error. I am just testing now but what i would like to do is to use actually only RadTimePicker.
    Thanks,
    Gratian.
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Jan 2011
    Link to this post
    Hi Gratian,

    You should have control that implements ITextControl or you should use a controls with the following types

    • CheckBox
    • RadDateInput
    • RadDatePicker


    Kind 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
  12. Nikita
    Nikita avatar
    3 posts
    Registered:
    06 May 2011
    10 May 2011
    Link to this post
    Hi,
    I am using RadDatePicker in LibraryItemBatchEdit template. But upon saving the values the Date value is not persisted.
    Please guide as to what would be the problem.
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    10 May 2011
    Link to this post
    Hi,

    Please make sure that you added the metakey inside <metaFields> and <libraryInfo> section of the web.config.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Nikita
    Nikita avatar
    3 posts
    Registered:
    06 May 2011
    10 May 2011
    Link to this post
    HI Ivan,

    I have added the metakey in the web.config
    <metaFields>
    <add key="Addendums.EffectiveDate" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now" />
    </metaFields>
      
      
            <libraries defaultGenericProvider="Libraries">
                <genericContentProviders>
                    <add providerName="Libraries" publicationDateField="Publication_Date" />       
                    <add providerName="Addendums" publicationDateField="Publication_Date" />
                </genericContentProviders>
                <libraryInfo>
                    <add name="PDF Document" title="Document Library" defaultExtenstions=".pdf" metaKeys="Description, Extension, Name, Size, Category, State , FactsheetDate, Year, CreationDate, SnapshotDate, SchemeID, New, SubCategory, EffectiveDate, Change" >
                    </add>
                    <add name="Image" title="Image Library" defaultExtenstions=".png, .jpg, .jpeg, .gif" metaKeys="Author, AlternateText, Extension, Name, Height, Width, Size, Category">
                    </add>
                     ......
      
                </libraryInfo>
                <extensionMapping defaultExtension=".sflb.ashx">
                </extensionMapping>
            </libraries>


    The date values persist when we edit a single item using LibraryItemEdit but not with LibraryItemBatchEdit.

    Also when I use a TextBox in LibraryItemBatchEdit for the date value, it persists. but not with RadDatePicker

     

     

     

     

     

  15. Nikita
    Nikita avatar
    3 posts
    Registered:
    06 May 2011
    11 May 2011
    Link to this post
    Hi,

    Any updates as to what would be the problem?
    I need to solve this soon. please help
  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    12 May 2011
    Link to this post
    Hi ,

    BatchEdit mode works properly if you have 1 page. If you make changes to subsequent pages they will not apply. The control that persists the metakeys has support for RadDateImput and RadDatePicker, so i do not see what could be the problem with the operations here. Most probably the values are not shown only for the items that you set through batch edit, because they are set back the to default.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
16 posts, 0 answered