Closed Bug 490749 Opened 12 years ago Closed 10 years ago

File/New/Saved Search produces exception, if no account/no folder is selected at folder pane (Error: folder is undefined Source File: chrome://messenger/content/folderPane.js Line: 1463)

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 12.0

People

(Reporter: World, Assigned: aceman)

Details

Attachments

(1 file)

> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090426 Shredder/3.0b3pre

When no account/no folder was selected at folder pane,
  Changed from initial "All Folders" mode to other mode, Unread/Favorite/Recent,
  Or returned to "All Folders")
File/New/Saved Search produced following exception.
> Error: folder is undefined
> Source File: chrome://messenger/content/folderPane.js Line: 1463
> (This exception occurs upon each "File/New/Saved Search")
Avobe exception didn't occur if account or folder is selected at folder pane.

Error: folder is undefined Source File: chrome://messenger/content/folderPane.js Line: 1463
Wada is this a regression ?
Component: General → Mail Window Front End
QA Contact: general → front-end
Component: Mail Window Front End → Backend
Product: Thunderbird → MailNews Core
QA Contact: front-end → backend
> Wada is this a regression ?

Sorry but I don't know. I happened to see the problem, and the problem was reproduced by very simple operation I stated in comment #0.
This is still happening in TB12.

What should happen in this case? Just catch the exception and do nothing? Or show some prompt?
I can do the clean exiting from the function. But if we want any UI stuff...
What about a status bar message? Is there something already available? There must be other cases where we want to tell "No folder selected" so I could reuse that?
I'd suggest if no folder is selected, fall back to the default account root, and show the dialog.
Good idea. Patch coming.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: x86 → All
Attached patch fixSplinter Review
Attachment #583921 - Flags: ui-review?(bwinton)
Comment on attachment 583921 [details] [diff] [review]
fix

Since the UI isn't really changing, I don't think you need a ui-review from me.

So I'll give it a regular review instead.  ;)

The code looks pretty good.  The change is small and simple.  r=me.

Thanks,
Blake.
Attachment #583921 - Flags: ui-review?(bwinton) → review+
Thanks.
Keywords: checkin-needed
Well, very similar problem happens when using Folders->Favorite, when there are none to show, the left tree pane is empty. Restarting TB comes up with the msgAccountCentral.js pane showing about every action available, because it does not know which account is selected (none is). Clicking most of the commands throws an exception like
Error: window.parent.MsgJunkMail is not a function
Source File: chrome://messenger/content/msgAccountCentral.js
Line: 292

Is this filed somewhere?
Actually, that one bug is expected, that Junk feature is not ready, but was unintentionally exposed in the situation I described.
The real errors are
"Error: GetSelectedMsgFolder() is null"

Off to bug 713277.
Keywords: checkin-needed
Target Milestone: --- → Thunderbird 12.0
Checked in: http://hg.mozilla.org/comm-central/rev/e657c5051b99
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.