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

Forums / Developing with Sitefinity / Error in "Events" project

Error in "Events" project

5 posts, 0 answered
  1. Slava
    Slava avatar
    5 posts
    Registered:
    07 Mar 2008
    07 Mar 2008
    Link to this post
    Hello

    I try to create projects with both examples (contacts, events). The projects are compileble.
    But when I try to create item, for example for "events" module, I get the next error:


    The query EventDatesQuery has not been registered. Use DataConnection.Initialize or DataConnection.RegisterAssembly to register an assembly.


    The same error I see when I try to create project basis on "contact" module.


    Do you know what is it and how can  I fix it?
  2. Tihomir
    Tihomir avatar
    53 posts
    Registered:
    24 Sep 2012
    07 Mar 2008
    Link to this post
    Hi Slava,

    Do you mean our sample Events module that was posted on our company blog, or the built-in module in Sitefinity 3.2? If you mean the sample one, we strongly suggest using the built-in module as it is supported, tested and has a lot more to offer both in features and stability.

    Please excuse us for the extra email round-trip required!

    Greetings,
    Tihomir
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Slava
    Slava avatar
    5 posts
    Registered:
    07 Mar 2008
    10 Mar 2008
    Link to this post
    Hi, Tihomir

    Thanks for the answer.
    I really used module that was posted in your company blog, and my version of sitefinitty was 3.1

    Now I'm trying to work with version 3.2
    But I still have some problems.

    For example. How can I change structure of the event (I need short description, author, IsView property in my project)?


    And one more question.

    When I edit EventsView control on my page, I see ItemListUrl property.
    On some of my pages I have EventList control. I need to display first four events on it and link to page with all events. I do it by disabling paging on the EventsView control, and set ItemsPerPage property amounts to 4. Everything is fine. But how can I get value of the ItemListUrl  property to create my link?
    I can see this property placed in sf_CMSControlProperty table and depends on my controlId. How can I get properties of the module?

    So, you gave me an advise that I should use build-in modules. But according to the example of events module posted in your company blog I can do everything I want: change structure, make any functionality of the controls and e.t.c. But problem is that this example works incorrectly.

    Do you have any example of event module with open source code for it's customization?
    Because I don't still understand how can I create my custom modules. I can just use your CMS templates.

    Thanks.
  4. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    10 Mar 2008
    Link to this post
    Hi Slava,

    Here are answers to your questions (I am talking about built-in module in 3.2, not the one on our blog):

    The Events module is based on Generic Content module, which means that you can change meta fields as you need. So for example if you need short description, author and such fields you can easily add them to Events module. The process of doing so is explained in this video:

    http://www.sitefinity.com/Videos/UsingCustomMetaFieldsWithContent/

    Regarding your second question, the simplest solution that comes to my mind is to create a custom control and inherit EventsView control. Our public controls declare almost all of the methods as virtual which means that you can override them as you see fit. So, to create that link that would lead to ItemListUrl, you would create new control and override CreateChildControls method which would set the NavigateUrl property of desired control in your template to the value of ItemListUrl property. Because you would be inheriting the EventsView control all the other functionality would be already there for you. By taking this approach you could also implement a simpler solution for displaying only first four events on that control. Let me know if you need more information on any of this.

    The bottom line is, you don't need to create a custom module to achive the functionality you've described. All you need to do is modify the meta fields of Events module and create a public control that would work a bit differently than the default EventsView control.

    I hope you find this information helpful.

    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Slava
    Slava avatar
    5 posts
    Registered:
    07 Mar 2008
    10 Mar 2008
    Link to this post
    Thanks a lot, Ivan!
Register for webinar
5 posts, 0 answered