The default bug view has changed. See this FAQ.

Filter won't save if tags is empty is set

RESOLVED FIXED in Thunderbird 15.0

Status

MailNews Core
Filters
--
minor
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: rkent, Assigned: aceman)

Tracking

Trunk
Thunderbird 15.0
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
STR:

1) Create a message filter with the single search term "Tags Is Empty" and no assigned name.

2) Save.

The filter is not saved, and the filter editor dialog stays open. Error console says:

Error: [Exception... "Index or size is negative or greater than the allowed amount"  code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)"  location: "chrome://messenger/content/FilterEditor.js Line: 445"]
Source File: chrome://messenger/content/FilterEditor.js
Line: 183

This is originating actually from line 445:


441    // Assign a name based on the first search term.
442    let searchValue = termRoot.searchvalue;
443    let selIndex = searchValue.getAttribute( "selectedIndex" );
444    let children = document.getAnonymousNodes(searchValue);
445    let activeItem = children[selIndex];

Workaround: assign a name to the filter.
(Assignee)

Comment 1

5 years ago
I do not understand this. How do you create "Tags is Empty"? When I choose field Tags I get the list of tag names in the value field (like Important, Work, etc). Where is the "empty" value?
(Assignee)

Comment 2

5 years ago
I see now, you put that in the conditions list, not actions.
Nowadays in TB11, clicking OK does nothing (as you report), but the error console contains:

Error: activeItem is undefined
Source File: chrome://messenger/content/FilterEditor.js
Line: 481
Version: unspecified → Trunk
(Assignee)

Comment 3

5 years ago
Created attachment 580696 [details] [diff] [review]
fix

The proposed fix produces a filter name of "Tags is empty:". The colon is superfluous, but I am not sure it is worth it to pursue killing it.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #580696 - Flags: review?(kent)
(Reporter)

Comment 4

5 years ago
I've been having a hard time getting my trunk debug build to work, plus today I was unable to download the attachment for the fix (might be an intermittent bugzilla error). Anyway I've not forgotten about this. I'll try again in a day or so.
(Assignee)

Comment 5

5 years ago
rkent, any success now?
(Reporter)

Comment 6

5 years ago
Comment on attachment 580696 [details] [diff] [review]
fix

I looked at this patch as well as tested it, and it works fine. Thanks for fixing this!(and sorry to be so slow nyself!)
Attachment #580696 - Flags: review?(kent) → review+
(Assignee)

Comment 7

5 years ago
Thanks.
Keywords: checkin-needed
Checked in: https://hg.mozilla.org/comm-central/rev/251fab15820b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
You need to log in before you can comment on or make changes to this bug.