Closed Bug 339487 Opened 18 years ago Closed 18 years ago

'undo' doesn't work after deleting item - need use 'undo' two times

Categories

(Calendar :: Sunbird Only, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: damian.publicemail, Assigned: jminta)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060427 Mozilla Sunbird/0.3a1+ After deleting event CTRL+Z or Undo doesn't work properly - I need use undo two times to recover item Reproducible: Always Steps to Reproduce: 1. create new profile 2. create item with recurrency (ev. sunday) 3. delete item (with occurrences) got error in JS Console ___ Error: Severe error in internal transaction code! ID does not already exist for modifyItem Please report this to the developers. Source File: chrome://calendar/content/calendar-item-editing.js Line: 289 ___ 4. click menu Edit->Undo no result, still can not see deleted item 5. click again menu Edit->Undo now I see item, that I deleted Actual Results: got two errors (see below) Expected Results: undo should works after first use Also when I click active link in JS Console (see error above) and close opened window with source, I got another error in JS Console ___ Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://global/content/findBar.js :: anonymous :: line 86" data: no] ___
Version: unspecified → Trunk
(In reply to comment #0) > Error: Severe error in internal transaction code! > ID does not already exist for modifyItem > Please report this to the developers. > > Source File: chrome://calendar/content/calendar-item-editing.js > Line: 289 Hmm... I really never expected this code to be reached. :-/ There is a race condition here, so I'm wondering whether you're simply hitting Undo too quickly? If you wait a significant period of time, does Undo work then? The findBar.js error is different and un-related. It needs a separate bug.
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060527 Mozilla Sunbird/0.3a2+. The JavaScript error is displayed right after selecting 'All occurrences' from the popup dialog. Undo operation is not involved at this point.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → Windows 2000
(In reply to comment #1) > Hmm... I really never expected this code to be reached. :-/ There is a race > condition here, so I'm wondering whether you're simply hitting Undo too > quickly? If you wait a significant period of time, does Undo work then? Click Undo, saw, that deleted item was not visible, so tried another Undo - worked, so rather time does not matter Just verified if this is not refreshing problem, but after 10 seconds and restoring main window - no result, again second Undo resolved problem > The findBar.js error is different and un-related. It needs a separate bug. Should I open another bug about findBar.js? It will be depend on this one.
This bug will be fixed by the patch in bug 329642. js-stack right after the error is thrown 1: debugLogStack 2: 3: onOperationComplete 4: 5: modifyItem 6: 7: doTransaction 8: doTransaction 9: deleteItems 10: deleteEventCommand Notice that we delete the item first. Then, the delete key event bubbles up to where we try to delete just the occurrence (modifyItem). This adds the extra transaction to the undo queue and throws the error, since the item doesn't exist.
Assignee: nobody → jminta
Depends on: 329642
bug 329642 was checked in, so this bug should have disappeared. If anyone can still reproduce with a nightly build, you can reopen.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
fixed, console is empty Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060703 Sunbird/0.3a2+
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
Litmus testcase 2622 created
Whiteboard: [litmus testcase wanted]
Litmus testcase 2623 created
You need to log in before you can comment on or make changes to this bug.