Recurrence Error

22 posts, 0 answers
  1. Tommy Kan
    Tommy Kan avatar
    7 posts
    Member since:
    Aug 2008

    Posted 01 Jan 2010 Link to this post

    I'm trying to generate the RecurrenceRule by code.
    However,  it failed when selecting "Monthly" and "The first day of every month"

    The error can be reproduced in Telerik Demo Web Site:

    1.  Add a new appointment.
    2.  Click the "Option" button
    3.  Check the "Recurrence" checkbox
    4.  Select "Monthly"
    5. Select "The first day of every 1 month(s)"
    6.  Click "Save"
    7.  There was an error generated.

    In my project, I got the "Object reference not set to an instance of an object" error.

    Thanks,
    Wilson


  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 06 Jan 2010 Link to this post

    Hi Tommy,

    Thank you for reporting this issue. We were able to reproduce it easily thanks to your detailed instructions. We'll be working on a fix in the following days. Once we're ready the fix will included in the next internal build.

    As a token of our gratitude for your involvement, your Telerik points have been updated.

    Kind regards,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 06 Jan 2010 Link to this post

    Does this error have anything to do with the recurrence rule string not getting generated properly?
    Can you shed some light as to what the problem actually is if possible?
    I was having some issues recently regarding the monthly First/Second/Third etc Day of every # month(s) recurrence...

    Also it seems that after generating the error that the first poster noted, there is always a consistent error when deleting items it seems.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 06 Jan 2010 Link to this post

    Hello,

    Indeed the problem is with generating the recurrence rule. We're not aware of any issues with deleting appointments us of now. Perhaps you can create a new forum thread with more details on the issue?

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 06 Jan 2010 Link to this post

    well it's difficult to tell if the the two issues are related.
    i simply reproduced tommy's steps since it sounded so familiar to an issue i was having.
    after i get the first error message i try to delete the appointment i created and any other existing appointment and that same error dialog keeps popping up.


    regards
  7. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 06 Jan 2010 Link to this post

    When I schedule a singular appointment and then click delete, no events are fired that I can capture so I don't know where to put the delete code (I do everything in code-behind).  Then, when I try to delete the same event, I get the dialog box asking if I want to delete the singular instance or all occurrences (no multiple occurrences are ever selected by me).  Either option I select I am confronted with an exception:
    System.InvalidOperationException: Cannot locate the parent of appointment with ID = '141'
    Ensure that the parent appointment with 
    ID = '0' exists and is loaded. 
    I am really getting annoyed at the lack of good documentation for these controls.  I do not create webforms with drag-n-drop; no real programmer does.  Where is the documentation for all the methods and properties?

    Cheerless,
    Mark
  8. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 06 Jan 2010 Link to this post

    hey mark.
    take a look here and see if this thread helps at all.
    http://www.telerik.com/community/forums/aspnet-ajax/scheduler/parent-recurrence-id-bug.aspx
  9. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 06 Jan 2010 Link to this post

    Thanks, towps, but it really doesn't shed much light on the problem.  If I knew the relationship between the appointment.ID and the reccurrence_parent_id, I might be able to figure out what is going on, but, of course, there is no documentation on this point.  Is there supposed to be a separate db table for occurrences that are mapped by foreign key to the appointment.ID?  What is going on?

    I read the online documentation/tutorial on RadScheduler and it is no help.  In fact, it is downright stupid in offering a tutorial using the session context as the datasource instead of a database.  And it doesn't cover any advanced stuff like resource types, resources, or even how to get the added description and annotation fields.  The PDF documentation I found was published in Nov. 2008, and it mostly assumes, like the online documentation, that programmers like the VS Designer drag-n-drop.  It sucks!

    Perhaps Russians can read minds, but I can't.

    Cheers!
    Mark
  10. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 07 Jan 2010 Link to this post

    the recurrence parent ID of a child appointment should be set to the appointment ID of a parent that is returned to the schedulers appointments collection.
    I was receiving that same error when deleting an exception due to a data type issue (though it exists, comparing string verses Guid the framework won't find my parent).
    Telerik is converting the appointment ID's to Guids, just as I set them, but not the parent ID's...

    My Get Appointments method simply converts my specific custom object into a telerik appointment object. Any property on my class that I can't map directly to the telerik appointment I set in the appointment attributes collection.

    That being said my backend tables store a parent recurrence Id with each of my individual scheudles so I can set up the parent child relations in the telerik appointment objects before i bind them to the scheduler.
  11. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 11 Jan 2010 Link to this post

    I noted that the Scheduler tutorial that places the appointment objects in a session variable uses GUIDs for the recurrence parent IDs, and I tried that but was getting exceptions using GUIDs with String methods.  So I just let the database choose the ID by creating a sequence table.  Do you suppose this is the source of my problem?

    Cheers!
    Mark
  12. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 11 Jan 2010 Link to this post

    Hello,

    There is a kb article on Using GUIDs as appointment primary keys with SQL Server. It has been updated to handle all cases (delete, update, insert) with recurring appointments as well.

    Also, we have exposed additional server events to facilitate custom implementation of various scenarios related to recurring appointments -

    • OnOccurrenceDelete
    • OnRecurrenceExceptionCreated

     

    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  13. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 09 Feb 2010 Link to this post

    Has Tommy Kan's initial complaint been addressed?
    I notice that I can successfully create monthly relative's on the demos but I'm still getting a parse exception on the recurrence rule in the latest release.

    Has this been addressed in any recent internal builds?

    regards,
  14. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 12 Feb 2010 Link to this post

    Hello towps,

    Which version have you tested? Currently, the demo referenced in Tommy Kan's initial question no longer exhibits this problem. Let me know if I am missing something.


    Greetings,
    Peter
    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.
  15. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 12 Feb 2010 Link to this post

    the demos seem fixed which is why i am posing my question.
    i'm still getting the error in my project.
    is this something that was fixed in the Web.UI.DLL or would it have been an advancedForm.js fix.

    May I ask how the online demos needed to be corrected to fix the problem?
    I really need a fix for the bug I am seeing.

    Please take a look at the sample rule that was generated for one of my monthly realtive appointments. This is not parsable apparently.
    Any help on how I can make certain that whatever generates the rule will always generate a valid one would be great!


    DTSTART:20100216T090000Z
    DTEND:20100216T093000Z
    RRULE:FREQ=MONTHLY;UNTIL=89991231T235959Z;INTERVAL=1;BYSETPOS=NaN;BYDAY=



    Regards,
  16. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 16 Feb 2010 Link to this post

    Hi towps,

    This recurrence rule seem incomplete. Is this what RadScheduler generated? If not, then please send us the entire rule so we can test it.


    All the best,
    Peter
    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.
  17. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 16 Feb 2010 Link to this post

    Yes this is taken directly from what the scheduler's been generating for monthly recurrence rules.
  18. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 18 Feb 2010 Link to this post

    The rule is broken in rrule after this call in the advanced form

     var rrule = $T.RecurrenceRule.fromPatternAndRange(this._getPattern(), range);
  19. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 18 Feb 2010 Link to this post

    Part of the error might have something to do with the fact that

    parseInt(this._getElement("MonthlyDayMaskDropDown").value, 10);
    &
    parseInt(this._getElement("MonthlyDayOrdinalDropDown", 10).value);

    returns NaN

    In this case this._getElement("MonthlyDayMaskDropDown").value = "Tuesday" for example.
    &
    this._getElement("MonthlyDayOrdinalDropDown", 10).value = "second" // as in second tuesday of the month



    i thought the problem might be in the _formatRRule function in teh RecurrenceRule.js file but that seems to depend on the parameters given which are the pattern and the range and in my case the pattern is messed up.

    I'm going to look to see if a newer version of advanced form.js is up with the beta release and see if there are any changes in there that might help me.

    regards
  20. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 19 Feb 2010 Link to this post

    I put my own fix in for this.
    Updated the AdvancedForm.js file so that instead of trying to return the result of parseInt against the value of the selected combo box item, I just did a switch on the combo box item selected value string and returned the appropriate int value based on the telerik DayMaskValues enum and the DayOrdinalValues setup in the AdvacnedForm code behind.

    Seems to do the trick. There may be a cleaner way of doing it using parseInt that I'm not aware of.
    If there's a better fix, let me know.

    I'm thinking the value of the items should be the integer.
    The code behind seems to populate them with description and integer values.

    Thanks.
  21. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 19 Feb 2010 Link to this post

    Hi,

    Glad to see that you've managed to solve the problem. It should be fixed in the latest version of the AdvancedForm.js file as well.

    The code now looks like this:
    return parseInt(this._getControl("MonthlyDayMaskDropDown").get_value(), 10);

    All the best,
    Tsvetomir Tsonev
    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.
  22. John
    John avatar
    2 posts
    Member since:
    May 2012

    Posted 25 Feb Link to this post

    We are also having a similar issue like RecurrenceRule parse Error ('System.NullReferenceException' in Telerik.Web.UI.dll )
    We are  trying to generate the RecurrenceRule in c# code.
    However,  it failed when selecting "Monthly" and "The first day of every month" or "The second day of every month" etc.

    We have performed the following steps..

    1. From the "Recurrence" section, selected "Monthly" option
    2. Selected "The first day of every 1 month(s)"
    3. Clicked on "Save" button and an error ('System.NullReferenceException' in Telerik.Web.UI.dll ) was generated at the RecurrenceRule.TryParse method. 

    http://www.screencast.com/t/UaKU0nMeKnl

    As per this post, we have upgraded our current telerik.web.ui.dll('2013.1.403.40') version to '2016.1.113.45'. Now we are  not getting null reference exception but, we could'nt  parse the rule corresponting to this appointment i.e. "DTSTART:20160225T171739Z\r\nDTEND:20160225T171739Z\r\nRRULE:FREQ=MONTHLY;INTERVAL=1\r\n". Could you please help?

  23. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 01 Mar Link to this post

    Hello John,

    The format of the recurrence rule is not correct and it could not be parsed properly and the returned value is null. Here is a sample how this should be done. This could be easily inspected when in the XML file when an appointment is created e.g.:

    var rule = RecurrenceRule.TryParse(@"DTSTART:20160218T000000Z
    DTEND:20160219T000000Z
    RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=1;BYDAY=MO,TU,WE,TH,FR,SA,SU");


    Regards,
    Peter Filipov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017