Error: selectedFolders[0]/msgFolder is undefined when opening the File menu of the standalone msg window

RESOLVED FIXED in Thunderbird 3

Status

Thunderbird
Mail Window Front End
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: Magnus Melin, Assigned: Magnus Melin)

Tracking

({regression})

Trunk
Thunderbird 3
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Open an .eml file in the standalone message window (I used on attached .eml from an email), open the File menu

in IsAccountOfflineEnabled():
Error: selectedFolders[0] is undefined 
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 2146

Also after overing over "New ->", in menu_new_init():
Error: msgFolder is undefined
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 52

Pretty sure this is a fairly recent regression. Didn't look to closely, but presumably some menu items don't work correctly due to this.
(Assignee)

Comment 1

10 years ago
Partly this was a regression from bug 416666 (attachment 303943 [details] [diff] [review]), partly due to premature optimization. 
Assignee: nobody → mkmelin+mozilla
Blocks: 416666
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Thunderbird 3
(Assignee)

Comment 2

10 years ago
Created attachment 316191 [details] [diff] [review]
proposed fix

Fixes:
 - msgHdr is null for .eml files
 - make the standalone msg window version of GetSelectedMsgFolders not return an array with wrong length, the 3pane version returns a 0-size array, so doing it here too
 - function checkMsgHdrPropertyIsNot looks to be unused now after the patch in my previous comment
Attachment #316191 - Flags: review?(philringnalda)
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
Comment on attachment 316191 [details] [diff] [review]
proposed fix

Looks good, thanks. r=philringnalda
Attachment #316191 - Flags: review?(philringnalda) → review+
(Assignee)

Comment 4

10 years ago
Checking in mail/base/content/mailWindowOverlay.js;
/cvsroot/mozilla/mail/base/content/mailWindowOverlay.js,v  <--  mailWindowOverlay.js
new revision: 1.197; previous revision: 1.196
done
Checking in mail/base/content/messageWindow.js;
/cvsroot/mozilla/mail/base/content/messageWindow.js,v  <--  messageWindow.js
new revision: 1.63; previous revision: 1.62
done

->FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.