Closed Bug 369885 Opened 18 years ago Closed 18 years ago

Can't navigate, View fails on repeating events with modified occurrences

Categories

(Calendar :: Provider: ICS/WebDAV, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: matthaeus123, Assigned: ssitter)

References

Details

(Keywords: regression, Whiteboard: [no l10n impact])

Attachments

(2 files, 1 obsolete file)

With the nightly branch builds of Calendar 0.4a1, the user is unable to navigate through months. The names of the months change but the dates do not change. Reproduce: 1. Go to month view 2. try to go to next month. What should have happend: Calendar should have changed to next months events, and the events should be visible. Error console: 2 Different errors 1. Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIItemBase.calendar]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://calendar/content/calendar-month-view.xml :: relayout :: line 426" data: no] Source File: chrome://calendar/content/calendar-month-view.xml Line: 426 2. Error: itd.item.calendar.uri has no properties Source File: chrome://calendar/content/calendar-month-view.xml Line: 426 Build ID: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.2pre) Gecko/20070209 Calendar/0.4a1
Figured out this was caused by corrupted local calendars
I can reproduce the error from above using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2pre) Gecko/20070208 Calendar/0.4a1: Steps to Reproduce: 1. Start Sunbird with clean profile 2. Create repeating event in ics calendar on local disc 3. Modify one occurrence of this event e.g. by changing start time and title 4. Restart Sunbird 5. Switch views After startup I see the following error and the modified occurrence has no calendar color set: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIItemBase.calendar]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://calendar/content/calendar-view-core.xml :: setCSSClasses :: line 140" data: no] Switching to Month view produces the following error and I can't navigate as observed by matthaeus123: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIItemBase.calendar]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://calendar/content/calendar-month-view.xml :: relayout :: line 426" data: no] Opening the .ics file in another profile causes: Error: item.calendar.uri has no properties Source File: chrome://calendar/content/calendar-view-core.xml Line: 140 Import into storage calendar results in: Error: itd.item.calendar.uri has no properties Source File: chrome://calendar/content/calendar-month-view.xml Line: 426 This might be a regression from Bug 364841 and Bug 368490, further testing is required to find a regression range.
Attached file ics testcase —
The .ics file I created with Sunbird that causes the problems.
Flags: blocking-calendar0.5?
I not get this message in the error-console Error: itd.item.calendar.uri has no properties Source File: chrome://calendar/content/calendar-month-view.xml Line: 430
(In reply to comment #4) > I now getting this message in the error-console > > > Error: itd.item.calendar.uri has no properties > Source File: chrome://calendar/content/calendar-month-view.xml > Line: 430 >
Keywords: regression
OS: Windows Vista → Windows 2000
Summary: Cannot navigate monthly view → Can't navigate, View fails on repeating events with modified occurrences
Regression range testcase file from above with ics provider: Works in 0.4a1 (2007011008) ok Fails in 0.4a1 (2007011010) modified occurrences not displayed (bug 368490) ... Fails in 0.4a1 (2007012803) modified occurrences not displayed (bug 368490) Fails in 0.4a1 (2007012912) error in views (this bug) So this indead looks like a regression from Bug 364841 that was covered by Bug 368490 the first time.
Flags: blocking-calendar0.5? → blocking-calendar0.5+
matthaeus123, please don't grant blocking-calendar0.5 (+) yourself, only ask for blocking-calendar0.5 (?). Granting will be done by the driver of the release.
Flags: blocking-calendar0.5+ → blocking-calendar0.5?
Oh, I'm sorry.
Severity: critical → normal
Component: Calendar Views → Provider: ICS/Webdav
Flags: blocking-calendar0.5? → blocking-calendar0.5+
QA Contact: views → ics-provider
Target Milestone: Future → Sunbird 0.5
(In reply to comment #7) > matthaeus123, please don't grant blocking-calendar0.5 (+) yourself, only ask > for blocking-calendar0.5 (?). Granting will be done by the driver of the > release. You can prevent that by setting the grant group for this flag type. Ask someone with editcomponents and editgroups privs on b.m.o. ;)
FYI this bug occurs on the trunk and nightly builds Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a3pre) Gecko/20070227 Also, I think that this should be set at a severity higher than normal. This is a pretty big bug.
Severity: normal → major
I think the following code in calIcsParser.js is the cause for the error: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/calendar/base/src/calIcsParser.js&rev=1.2&mark=133#116 var rid = item.recurrenceId; if (!rid) { unexpandedItems.push(item); if (item.recurrenceInfo) { uid2parent[item.id] = item; } } else { item.calendar = this; // force no recurrence info: item.recurrenceInfo = null; excItems.push(item); } Previously, in the old calICSCalendar.js implementation "this" in "item.calendar = this;" refered to the calICSCalendar object derived from calICalendar. But in the new implementation "this" refers to the calIcsParser object that doesn't implement calICalendar. Therefore the later call to access one of the calICalendar properties fails.
Testing showed that removeing the line in calIcsParser that sets .calendar and adding a loop in calICSCalendar that sets .calendar for all items afterwards doesn't work. The reason is that the .calendar property was set for the exception items only. Later the exception item was stored in recurrenceInfo property of the parent item. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/calendar/base/src/calIcsParser.js&rev=1.2&mark=133,145-149#130 The calIcsParser returns only the list of parent items. For this items the .calendar property is set during adding to the memory calendar. For the exception items the .calendar property is not set - hence the error.
Attached patch rev0 - fix for calICSCalendar (obsolete) — — Splinter Review
This fixes calICSCalendar only by setting the .calendar property for all items and exceptions after retrieving the items from the calIcsParser. Note: A similar solution will be required for all other users of calIcsParser, e.g. calIcsImporter.
Attachment #257226 - Flags: first-review?
Attachment #257226 - Flags: first-review? → first-review?(mvl)
Comment on attachment 257226 [details] [diff] [review] rev0 - fix for calICSCalendar >Index: mozilla/calendar/providers/ics/calICSCalendar.js >+ exception.calendar = this; > this.mMemoryCalendar.adoptItem(item, null); When you call adoptItem with an item, the caller should not have to worry about setting .calendar on the item. The provider is supposed to be doing that. So your loop should be moved into the memory calendar, in the adoptItem method.
Attachment #257226 - Flags: first-review?(mvl) → first-review-
Move the loop into calMemoryCalendar::adoptItem() as requested
Attachment #257226 - Attachment is obsolete: true
Attachment #257268 - Flags: first-review?(mvl)
Assignee: nobody → ssitter
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: [needs review][patch in hand]
Comment on attachment 257268 [details] [diff] [review] rev1 - fix for calICSCalendar [checked in] r=mvl
Attachment #257268 - Flags: first-review?(mvl) → first-review+
This patch from Comment #16 only fixes the IcsProvider and the import into IcsCalendar. But after import into storage calendar the problem still exists until Sunbird/Thunderbird is restarted. I could not test how other providers behave. Leave the bug open after checkin or file a followup bug?
Whiteboard: [needs review][patch in hand] → [needs checkin]
Leave open.
Patch checked in on MOZILLA_1_8_BRANCH and trunk.
Whiteboard: [needs checkin]
Attachment #257268 - Attachment description: rev1 - fix for calICSCalendar → rev1 - fix for calICSCalendar [checked in]
The patch seems like it didn't fix the problem. And has caused a fairly critical regression. I am getting this error now. Error: aDate is not defined Source File: chrome://calendar/content/calendar-decorated-base.xml Line: 104 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a3pre) Gecko/20070308 Calendar/0.6a1
(In reply to comment #21) No. This is a regression from Bug 370836 and already fixed. See Bug 373187 Comment #2.
ok
qawanted: After the ics calendar being fixed: What's the current failure mode when importing testcase to e.g. caldav, wcap, gdata calendar?
Keywords: qawanted
Whiteboard: [no l10n impact]
(In reply to comment #24) > qawanted: After the ics calendar being fixed: What's the current failure mode > when importing testcase to e.g. caldav, wcap, gdata calendar? > I imported the testcase to a caldav calendar using current Linux/branch nightly and was able to navigate (which is to be expected since the caldav provider does not yet use calIcsParser.js). No js console errors.
I checked this issue in the latest lightning-wcap build and it works for me, too.
Given that this apparently doesn't affect usability of WCAP and CalDAV, I'm removing the blocking flag from it.
Flags: blocking-calendar0.5+
Not going to make the 0.5 train.
Target Milestone: Sunbird 0.5 → ---
Resolving this bug as FIXED based on the previous comments. Please file new bug reports that references this bug if there appear issues with other providers too.
Blocks: 364841
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: qawanted
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: