Closed Bug 417508 Opened 16 years ago Closed 16 years ago

Event dialog is broken, it's not possible to edit events and tasks

Categories

(Calendar :: General, defect)

defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13pre) Gecko/2008021405 Calendar/0.8pre

Steps to Reproduce:
1. Start with new profile
2. Create event and save it
3. Try to edit the created event

Actual results:
Event dialog is broken completely. Error Console shows:

Error: [Exception... "'Can not modify immutable data container' when calling method: [calIItemBase::calendar]"  nsresult: "0x80460002 (NS_ERROR_OBJECT_IS_IMMUTABLE)"  location: "JS frame :: chrome://calendar/content/sun-calendar-event-dialog.js :: loadDialog :: line 292"  data: no]
Source File: chrome://calendar/content/sun-calendar-event-dialog.js
Line: 292
Flags: blocking-calendar0.8?
Works for me using compiled build...
Flags: blocking-calendar0.8? → blocking-calendar0.8+
I take that back, confirmed, blocks 0.8
Attached patch Fix v1 (obsolete) β€” β€” Splinter Review
This fixes and also corrects some comments.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #303327 - Flags: review?(Berend.Cornelius)
I think in your patch a hunk is missing: You changed the signature of 'appendCalendarItems" in calendar-ui-utils" but did not change anything within sun-calendar-event-dialg.js.
I guess that you had in mind to solve the problem by simply removing the line
item.calendar = calendarToUse -which was the root of the problem - and then append the 'calendarToUse' as third parameter in the call of "appendCalendarItems". But by doing so you will run into the problem described by "bug 416584 – Drag and drop of an ics file over calendar icon is not handled correctly" where the root cause is that the  item in "saveDialog" does not carry a calendar.
Comment on attachment 303327 [details] [diff] [review]
Fix v1

denying review...
Attachment #303327 - Flags: review?(Berend.Cornelius) → review-
Attached patch Fix v2 β€” β€” Splinter Review
Yes, I missed a directory on cvsdiff.

Including missing hunks. Setting item.calendar unconditionally when saving to make sure the correct calendar is used.
Attachment #303327 - Attachment is obsolete: true
Attachment #303534 - Flags: review?(Berend.Cornelius)
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → 0.8
Version: Trunk → unspecified
Due to an outage in our company I could not fully test this patch. If you move the

> item.calendar = document.getElementById("item-calendar").selectedItem.calendar; 

to the first line of "SaveDialog()" before the first call of getItemProperty()" it works fine.

I haven't tested if bug
Bug 416584 – Drag and drop of an ics file over calendar icon is not handled correctly
still occurs with your patch. It should not be any problem because as we could see the item is not immutable in SaveDialog(), but you could probably test this.
As this patch is ver urgent I give r+
Comment on attachment 303534 [details] [diff] [review]
Fix v2

r=Berend
Attachment #303534 - Flags: review?(Berend.Cornelius) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
-> VERIFIED

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8pre) Gecko/20071022 Lightning/0.8pre (2008021518) Thunderbird/2.0.0.6 ID:2007102215
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.