Closed
Bug 394025
Opened 18 years ago
Closed 18 years ago
Removing last or selected calendar from list causes exception "Could not convert JavaScript argument"
Categories
(Calendar :: General, defect)
Calendar
General
Tracking
(Not tracked)
VERIFIED
FIXED
0.7
People
(Reporter: ssitter, Assigned: Fallen)
Details
Attachments
(1 file)
9.98 KB,
patch
|
michael.buettner
:
review+
|
Details | Diff | Splinter Review |
Using Lightning 0.7pre (2007082807) resp. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7pre) Gecko/20070828 Calendar/0.7pre
Removing last calendar from list causes exception "Could not convert JavaScript argument"
Steps to Reproduce:
1. Start Sunbird or Thunderbird with Lightning
2. Switch to Calendars tab and delete all calendars
3. Check Error Console
Actual Results:
Error: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://calendar/content/calendar-management.js :: cLTV_onSelect :: line 429" data: no]
Expected Results:
No error.
Before the checkin for Bug 388405 Lightning automatically re-created the default 'Home' calendar as soon as the last calendar is removed. This no longer works.
Before the checkin for Bug 388405 Sunbird disabled almost all functionality that requires a calendar. For example New Event and New Task were disabled. This no longer works.
In my opinion the previous Lightning solution is the better one to avoid this error and to prevent further errors e.g. creating events in the view while no calendar is present.
Comment 1•18 years ago
|
||
Also see bug 183396 for disallowing users to add events/tasks after deleting the last calendar.
Comment 2•18 years ago
|
||
(In reply to comment #1)
I don't see this going to be fixed soon, thus I agree with Stefan that we should auto-add a local calendar as before for now.
Flags: blocking-calendar0.7+
Reporter | ||
Comment 3•18 years ago
|
||
(In reply to comment #1)
Correct, Bug 183396 added the behavior described in Comment #0 to Sunbird but was reopened due to being incomplete.
OS: Windows 2000 → All
Hardware: PC → All
Reporter | ||
Comment 4•18 years ago
|
||
The previous Lightning solution was in getCalendarManager(), see
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/calendar/lightning/content/calendar-management.js&rev=1.23.2.33&mark=173,181-191#172>
Reporter | ||
Comment 6•18 years ago
|
||
Additional information:
The same error happens if one delete the currently selected calendar in the list although more calendars are present. In this case no either the previous or the next calendar should be selected automatically.
Reporter | ||
Updated•18 years ago
|
Summary: Removing last calendar from list causes exception "Could not convert JavaScript argument" → Removing last or selected calendar from list causes exception "Could not convert JavaScript argument"
Assignee | ||
Comment 7•18 years ago
|
||
Christian suggested, that it shouldn't be possible to remove the last calendar. This patch takes care of that and also fixes the bug. Please do a full rebuild if possible when testing, as I couldn't reproduce at first without a full make -f client.mk checkout and removing my dist dir.
Attachment #279908 -
Flags: review?(michael.buettner)
Comment 8•18 years ago
|
||
Comment on attachment 279908 [details] [diff] [review]
Prohibit deleting last calendar
I didn't find anything to complain about and the patch works as advertised -> r=mickey. By the way, I was able to reproduce the wrong behavior without any difficulties, the exception was thrown straight away after the last calendar has been deleted.
Attachment #279908 -
Flags: review?(michael.buettner) → review+
Assignee | ||
Comment 9•18 years ago
|
||
Checked in on HEAD and MOZILLA_1_8_BRANCH
-> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → 0.7
Version: Trunk → unspecified
Reporter | ||
Comment 10•18 years ago
|
||
Verified using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7pre) Gecko/20070907 Calendar/0.7pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•