Closed Bug 140075 Opened 24 years ago Closed 23 years ago

Mail and news: New filters aren't saved between sessions

Categories

(MailNews Core :: Filters, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.4alpha

People

(Reporter: fmcgee, Assigned: cavin)

References

Details

(Whiteboard: [adt2])

Attachments

(1 file, 2 obsolete files)

I create a new mail filter and confirm that it's enabled. After quitting Mozilla Build 2002041711 and re-starting it, the filter isn't there. I'm using Mozilla 1.0RC1 on Intel Windows 2000 Pro sp2 with current patches.
^WFM with Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.0rc1) Gecko/20020417
Does not matter if filter name has spaces in it
Having the same problem under Win 98 SE. Create a filter, close the mail client, reopen it - the filter is still there. Quit Mozilla Build 2002053012, restart, the filter isn't there. I'm starting the mail client when the browser starts. Netscape 6.21 is also installed on thei machine (but not running at the same time as Mozilla) and it has the same problem.
somehow got one filter to stick. a search for rules.dat with the filter name in it finds that I have moved my root e-mail directory.
*** Bug 156728 has been marked as a duplicate of this bug. ***
I've seen this and have heard a couple reports of this when adding a few accounts (new profile) and trying to add filters for all accounts all at once before confirming the filter list dialog. It's not consistent, but often one or more of the accounts won't save the filters after exit and return. It seems to me we had another older bug about filters not saving, but couldn't find it, so am adding comments here. Navin, let me know if you want a separate bug for the multiple accounts factor.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Setting platforms to all, I know I've seen on Mac.
OS: Windows 2000 → All
Hardware: PC → All
OK, I'm able to do this somewhat consistently the more I play with it, even on an existing profile, when adding filters to multiple accounts in one filter dialog session, exit and return -- some account filters not saved, some are. Sometimes all are.
Keywords: nsbeta1
Got 1.1b build (en-US; rv:1.1b) Gecko/20020721 and made a new profile. Still occurs with directory in default location. is it helpful to post the contents of the rule that stuck?
I encountered this bug on mozilla 1.1b (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721. I was able to fix it as follows (although I still have no idea *why* this would fix it): 1. find the appropriate rules.dat file 2. open rules.dat in your favorite editor, add the following lines (ripped from a Netscape rules.dat I found on the web somewhere) after 'logging="no"': name="test" enabled="yes" type="2" scriptName="test" (I'm not sure exactly what this does; and it didn't seem to matter that the script named "test" didn't exist. 3. open mozilla mail. It sees the new rule. Add your own rule, exit, and re-open mozilla. Your rule is still there (or at least it was for me). 4. tell mozilla to delete the "test" filter rule. Hopefully this will give people who want to use filtering a quick fix, and maybe some of the developers can figure out why this would affect things (it looked to me like mozilla was never saving anything to rules.dat at all)
Tried above fix. Test rule shows up as described, but adding 1 rule via the "tools>message filters" menu or "message>create filter from this message" menu does not stick. This is the case for IMAP or POP3 rules.dat files.
Another test case with multiple mail acnts: -select one acnt and create a filter -after creating/saving it, go to the drop down box in filter window and switch to another mail account. -go back to the original mail acnt you created a filter on by using the drop down menu item again -now create another filter and save it result: you can't see your newly created filter. Switch to another mail acnt and switch back to the first acnt and you will then see the new filter.
Mail triage team: nsbeta1+/adt2
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt2]
Reassigning.
Assignee: naving → cavin
I am not sure if the bug that i found is the same as this bug here: When you create a filter and keep the "Message Filters..."-Dialog open when quitting Mozilla, the filters are not saved. If you close the "Message Filters..."-Dialog before quitting Mozilla, the filters are saved. I did find this because my window-manager can not close windows at the moment (fvwm ;) ) and the "Message Filters..."-Dialog is missing a close-button (this is a second bug, as i think). Mozilla 1.2.1/Linux.
Target Milestone: --- → mozilla1.4alpha
> When you create a filter and keep the "Message Filters..."-Dialog open when > quitting Mozilla, the filters are not saved. If you close the "Message > Filters..."-Dialog before quitting Mozilla, the filters are saved. > This is true. But I'm not sure if the original problem was caused by this. Does not look like it though from the comments. I can't seem to reproduce the problem now.
QA Contact: laurel → esther
Trunk build 2003-03-13: Mac 10.1.5, WinME I cannot reproduce the original problem. I can reproduce the problem described in comment# 12 where creating filters for a variety of accounts in one mail filters dialog session are not saved after an exit/restart.
Ah, ok, this only happens if you add a new filter to server #1, switch to the server #2 and then exit the filter dialog and then the mail program itself. Restart mail program and the filter you added to server #1 is gone (ie, not saved). I was able to see the problem.
Attached patch Proposed patch, v1. (obsolete) — Splinter Review
Save current filters before switching servers.
Attachment #117573 - Flags: superreview?(sspitzer)
Comment on attachment 117573 [details] [diff] [review] Proposed patch, v1. see onServerClick() in junkMail.js I added a check to avoid saving if "switches" from server x to server x (using the picker, but not switching). consider adding: { var item = event.target; if (item.id == gCurrentServerURI) return; // Save the current ...your new code) selectServer(item.id); } make that fix locally, and then r/sr=sspitzer nice fix, cavin.
Attachment #117573 - Flags: superreview?(sspitzer) → superreview+
Attached patch Proposed patch, v2 (obsolete) — Splinter Review
Found a problem when adding Seth's last comment. The server uri was changed/broken by patch of bug 179958. It now has something like imap://qatest20@nsmail-2/INBOX, instead of imap://qatest20@nsmail-2. Restore setServer() back to what it was before and in runSelectedFilters() make a call to getFirstFolderURI() to get the right folder (not server) uri since this is the only time we need a folder uri.
Attachment #117573 - Attachment is obsolete: true
Attachment #117647 - Flags: superreview?(sspitzer)
I don't think your last patch is right. we still want to call SetFolderPicker() from selectServer() with the *folder* uri (server + /INBOX) because that's the "run filters now" folder picker. you're doing the work in runSelectedFilters(), and that's too late (and the filter picker won't be set right.) I think all we want is your first patch (http://bugzilla.mozilla.org/attachment.cgi?id=117573&action=view) with the fix I suggested in my comment (http://bugzilla.mozilla.org/show_bug.cgi?id=140075#c20) and then this change: - gCurrentServerURI = firstFolderURI; + gCurrentServerURI = uri; did that not work?
Comment on attachment 117647 [details] [diff] [review] Proposed patch, v2 not the right fix.
Attachment #117647 - Flags: superreview?(sspitzer) → superreview-
Yeah, I forgot about the "run filters now" folder picker.
Attachment #117647 - Attachment is obsolete: true
Attachment #117675 - Flags: superreview?(sspitzer)
Comment on attachment 117675 [details] [diff] [review] Proposed patch, v3 r/sr=sspitzer
Attachment #117675 - Flags: superreview?(sspitzer) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2003-04-10: WinXP, Mac 10.1.5, Linux RH 8 Within one filter messages dialog session I added a number filters to different accounts (Mail and News). After an exit/restart, all filters remained. Cavin, I did notice that if I create a filter and quit without closing the Message Filters dialog then the filter is not saved. Should this have been fixed as well?
The original problem is fixed. I don't think the scenario mentioned in comment 15 is a bug. Basically you did not OK the filter creation so it shouldn't be saved. Note: Same behavior if you X close the Filter rules window without OK'ing it. Same behavior in 4.7 release when you Esc the Filter rules window (it doesn't have an X close option) instead of OK'ing it or exiting the app via ending the task. Verified
Status: RESOLVED → VERIFIED
I am still having this problem with Mozilla Mail in (BeOS; U; BeOS BePC; en-US; rv:1.5b) Gecko/20030904. This is the browser that came in BeOS R5.0.3 PE Max Edition V3. It does not matter even if I create only one filter for one account, the filter is not saved when I exit and then restart Mozilla. I also noticed the same bug in the next later Mozilla 1.5b about 03-09-17. There does not seem to be an OK button to press after creating a filter. This bug should probably be reopened at least in the BeOS version.
A correction to my last comment: There is an OK BUTTON to press after making a new filter. I just did not see it because the dialogue box froze up after I dragged it's bottom right corner to enlarge the box and it never resized properly to fill the new size outline. This might be another bug!
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: