In Ubuntu's Thunderbird, Empty Deleted warns, Empty "Inbox"!

Bug #1826874 reported by A. Richard Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Medium
thunderbird (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Issue: In Ubuntu desktop 18.10 and 19.04 (and perhaps years earlier?), when a Thunderbird user clicks on File>Empty Deleted, it warns that Empty "Inbox" will be done, instead! Ouch! (It does empty the correct folder anyway, but this should and does scare many users.)

After a protracted dialog with the Mozilla Thunderbird support team, I've learned that Mozilla's own vanilla Thunderbird shows Empty "Trash", as it should. They say that the version of Thunderbird that comes bundled with Ubuntu is to blame - so please fix it.

Note 1: Specifically, this wrong routine threatens to empty the active folder; commonly, that folder is "Inbox".

Note 2: There's no prompt at all, if the "Trash" dialog box is suppressed. But default is (and should be) to have it enabled.

Note 3: You can view the details of my Mozilla trouble-shooting (including my/Ubuntu's erroneous Thunderbird screen-print and Mozilla's correct one), here:
https://support.mozilla.org/en-US/questions/1254659#answer-1216735

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

Created attachment 9061306
tb-empty-trash.png

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/74.0.3729.108 Chrome/74.0.3729.108 Safari/537.36

Steps to reproduce:

(originally reported at https://support.mozilla.org/en-US/questions/1254659 but it's not an Ubuntu-specific issue as replies in that thread seem to imply)

1. Select any folder under any account in the left pane (e.g. a folder named "Foo Bar")
2. Open the file menu and click "Empty Trash"
3. Observe that a confirmation dialog is displayed ("Delete all messages and subfolders in the Trash folder?")

Actual results:

The title of the dialog reads 'Empty "Foo Bar"'.

Expected results:

The title of the dialog should be 'Empty Trash'.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the report. I can reproduce the issue with upstream builds, so it's not Ubuntu-specific.
Upstream bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1547664

Changed in thunderbird (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in thunderbird:
importance: Unknown → Medium
status: Unknown → New
Changed in thunderbird (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
In , Acelists (acelists) wrote :

And which folder does it actually empty?
I think we did this, because we also use this to empty the junk folder. But the context menu item to empty Junk or Trash shows only on the Junk and Trash folders. Not that this main menu item is active on any folder, but picks up the name of the current folder (but this one won't be emptied), this would be a bug.

Revision history for this message
In , Acelists (acelists) wrote :

There is already a note about this weirdness in the code: https://searchfox.org/comm-central/source/mail/base/content/folderPane.js#2651 :)

Revision history for this message
In , Acelists (acelists) wrote :

Created attachment 9062698
1547664.patch

Note that folder.emptyTrash() will look for a real trash folder anyway (server type dependent), it will not empty 'folder' unconditionally. So at least try to look for some real trash folder in the confirmation prompt.

Revision history for this message
In , Jorg K (jorgk) wrote :

Comment on attachment 9062698
1547664.patch

Review of attachment 9062698:
-----------------------------------------------------------------

Works for me, thanks.

::: mail/base/content/folderPane.js
@@ +2646,5 @@
> /**
> * Prompts the user to confirm and empties the trash for the selected folder.
> * The folder and its children are only emptied if it has the proper Trash flag.
> *
> + * @param aFolder (optional) The trash folder to empty. If unspecified, the

If unspecified? Did you want to say "if unspecified or not a trash folder"?

Revision history for this message
In , Acelists (acelists) wrote :

Yes.

Revision history for this message
In , Pulsebot (pulsebot) wrote :

Pushed by <email address hidden>:
https://hg.mozilla.org/comm-central/rev/7e7a8c180b0c
Ask for confirmation on the real trash folder if a non-trash folder was selected. r=jorgk

Changed in thunderbird:
status: New → Fix Released
Revision history for this message
A. Richard Miller (themillers) wrote :

Thank you - I think. When I filed this bug report with Mozilla, back on March 28th, I anticipated that this code would be REMOVED - providing only a fixed dialog box title instead, as with Empty Junk. No more, no less.

So, with my apologies for second-guessing:
- IS there any need to do more than to replace with that line of text?
- If so, should that be done for Empty Junk, as well?
- DOES Empty Trash/Empty Deleted also empty Junk (as one comment implies)?

Revision history for this message
Olivier Tilloy (osomon) wrote :

These questions should be asked on the upstream bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1547664

Revision history for this message
In , Jorg K (jorgk) wrote :
Revision history for this message
In , Jorg K (jorgk) wrote :

Well, that patch doesn't apply to comm-esr60 at all.

Revision history for this message
In , Jorg K (jorgk) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.