Open Bug 259184 Opened 20 years ago Updated 2 years ago

Renaming a news/blogs/RSS/feeds (or virtual) folder Inbox makes Thunderbird treat the folder as an actual inbox; cannot rename it from Inbox or delete it

Categories

(MailNews Core :: Database, defect)

defect

Tracking

(Not tracked)

People

(Reporter: mozilla, Assigned: aceman)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.3) Gecko/20040913 Firefox/0.10

I created a folder under my newsfeed account, which I later renamed "Inbox". Now
I can't rename it from Inbox or delete it - Rename and Delete do not appear on
the context menu and are greyed out in the menus. The folder appears above Trash
as if it were an actual inbox, but it does not use the Inbox icon.

This isn't an issue for email and newsgroup accounts, as email accounts come
with an immutable Inbox and folders cannot be manually created in newsgroup
accounts.

A fix for this would be to prevent the manual creation of folders under newsfeed
accounts, but doing this would practically prevent multiple feeds aggregating
into one folder (which I rather like).

It seems that the available options for a folder are determined by its name; in
my opinion this is a bad idea, as users will always find a way to name something
awkwardly.

Inboxes and other special folders should probably have metadata flags, that
cannot be altered; these should be used to determine folders' available options
and position, rather than the folder's name.

Workaround: "don't do that, then" - don't name a newsfeed folder "Inbox".

Reproducible: Didn't try
Steps to Reproduce:
1. Create a folder in a newsfeed account
2. Rename it "Inbox"

Reproducing would involve deleting the entire newsfeed account or wrangling with
multiple profiles, so I haven't tried.
Actual Results:  
Can't rename or delete the folder

Expected Results:  
Should be able to rename and/or delete the folder (assuming the former precedes
the latter)
The inbox is treated as special folder because it has MSG_FOLDER_FLAG_INBOX
assigned without consideration of RSS account. This is implemented in
nsMsgDBFolder::AddSubfolder(). The code shows that the same logic applies to
'trash', 'unsent messages' and 'outbox'. 

http://lxr.mozilla.org/seamonkey/source/mailnews/base/util/nsMsgDBFolder.cpp#3108

However, you will see that 'Sent', 'Drafts' and 'Templates' folders are handled
in SetFlagsOnDefaultMailboxes(). I believe that this method also covers the
other special folders. If this is correct, there is no reason to flag folders in
AddSubfolder().
This patch comments out the code which assigns special folder flags. The
flagging seems to be handled in SetFlagsOnDefaultMailboxes() according to
account type. see comment 1 for details.

seeking r?
Attachment #176628 - Flags: review?(mscott)
(In reply to comment #2)
> This patch comments out the code which assigns special folder flags. 

When you have a chance to test this patch, _please clean up folder cache first_
by deleting 'panacea.dat' in your profile. If you had created 'Inbox' using
current version, the folder had cached with MSG_FOLDER_FLAG_INBOX flag.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Still valid on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051120 Thunderbird/1.5 ID:2005112006
Status: RESOLVED → UNCONFIRMED
OS: Windows XP → All
Resolution: EXPIRED → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'm not able to reproduce this problem with TB 2b1-1223 or 3a1-1215, Win2K.
Still can't delete/rename RSS folder named Inbox on todays linux branch build. 
Comment on attachment 176628 [details] [diff] [review]
patch to prevent special folders being flagged without according to account type

I tried this... Didn't help for the problem. Maybe that code could be removed, but as far as I saw, removing t didn't do much of anything.
Magnus, do you see the problem with an existing "Inbox", or did you try this in a new profile?  That patch appears to prevent the folder from being set "special" rather than allowing it to be deleted once it *is* "special."
I created a new top level subfolder called Inbox. The context menu doesn't give the delete/rename options (with and without the patch). Didn't try with a new profile.

I notice I can rename an existing folder to Inbox and it's treated as a normal folder, but only until restart. After which it behaves as an inbox. Maybe that's why you didn't see it (in comment 7). 
(In reply to comment #11)
> I created a new top level subfolder called Inbox. The context menu doesn't
> give the delete/rename options (with and without the patch). Didn't try with
> a new profile.

OK, yes, I see this; I hadn't checked for that.  I was basing my comment 7 on the fact that the icon didn't change for the folder, but I should have noticed that the Inbox was also sorted above the Trash folder.  Sorry, my mistake.
QA Contact: rss
Comment on attachment 176628 [details] [diff] [review]
patch to prevent special folders being flagged without according to account type

minusing based on Magnus's comment that the patch didn't fix the problem for him.
Attachment #176628 - Flags: review?(mscott) → review-
Assignee: mscott → nobody
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
Hardware: x86 → All
Summary: Renaming a news/blogs/RSS folder Inbox makes Thunderbird treat the folder as an actual inbox; cannot rename it from Inbox or delete it → Renaming a news/blogs/RSS/feeds (or virtual) folder Inbox makes Thunderbird treat the folder as an actual inbox; cannot rename it from Inbox or delete it
Interesting.
Assignee: nobody → acelists
Version: unspecified → Trunk
The MSG_FOLDER_FLAG_INBOX should be set on the "Inbox" folder if we are in a POP3/IMAP4/Local folders accounts or any other account (like RSS) but only if it is the target of a deferred POP3 account.
Blocks: 425020
Component: Feed Reader → Database
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: