Bugzilla@Mozdev – Bug 26486
quickfilters-3.4.2 can't create Filter in Thunderbird versions < 47
Last modified: 2018-05-20 12:09:05
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=8389) [details] Thunderbird Troubleshooting Information Using quickfilters-3.4.2-sm+tb in Thunderbird 38.8.0, Windows 8.1 64bits I have 4 accounts in Thunderbird (POP accounts on SSL/TLS port 995) (note : in Account Setting>Server Settings>Message Storage>Advanced inbox is set to 'Inbox for different account:Local Folders', for all my accounts, so only local folders are displayed on the left side) If I right click a received message in any local folder, including the local inbox folder : "QuickFilters : create filter from message..." I get an error : "Tried to create a filter 7 times, but didn't work out [and more text]" Drag and drop gives the same error message. Attachment : Thunderbird Troubleshooting Information Also my extensions : Account Colors 9.1 true accountcolors@DW-dev Address Close Button 1.3 true address_close_button@emak.org Allow HTML Temp 3.7.4 true {532269cf-a10e-4396-8613-b5d9a9a516d4} Classic Toolbar Buttons 1.4.8 true CSTBB@NArisT2_Noia4dev Color Folders 1.1 true colorfolders@fisheater.com ColumnsWizard 6.0.4 true columnswizard@micz.it CompactHeader 2.1.0 true {58D4392A-842E-11DE-B51A-C7B855D89593} ConfirmBeforeDelete 0.3.5 true {51fff70c-0f33-4769-b411-67bd86836012} ConfirmFolderMove 1.1.2 true {c267db80-8a57-11da-a8d5-000a95be0946} Custom Address Sidebar 1.1.1-let-fixed true asbcustom@gmail.com DOM Inspector 2.0.15.1-signed true inspector@mozilla.org Get All Mail Button Thunderbird 0.1 true {0D4D76B0-657A-41b0-B3ED-60C638F4D97D} Identity Chooser 1.9.3 true identitychooser@janek.org Image Zoom 0.6.3.1-signed true {1A2D0EC4-75F5-4c91-89C4-3656F6E44B68} ImportExportTools 3.2.4.1 true {3ed8cc52-86fc-4613-9026-c1ef969da4c3} IsAdmin 2.5.1-signed true isadmin@vdtsoftware.ffext Manually sort folders 1.1 true tbsortfolders@xulforum.org NewScrollbars (aka NoiaScrollbars) 1.2.6 true NoiaScrollbars@ArisT2_Noia4dev No Message Pane Sorting by Mouse 1.2 true nomessagepanesort@janek.org Phoenity Buttons 0.57 true buttons@dillinger quickFilters 3.4.2 true quickFilters@axelg.com Restartless Restart 9.1-signed true restartless.restart@erikvold.com Show Address Only 0.1.9 true showaddressonly@rip238.selfip.com Show InOut 1.1.4 true showInOut@ggbs.de Signature Switch 1.6.13 true {2ab1b709-ba03-4361-abf9-c50b964ff75d} Slim Add-ons Manager 14.1 true slimaddonmanager@opendfki.de Thin Tabs 1.5.3 true thintabs@bonsaimind.org
(In reply to comment #0) > Created an attachment (id=8389) [details] [details] > Thunderbird Troubleshooting Information > > Using quickfilters-3.4.2-sm+tb in Thunderbird 38.8.0, Windows 8.1 64bits > > I have 4 accounts in Thunderbird (POP accounts on SSL/TLS port 995) > > (note : > in Account Setting>Server Settings>Message Storage>Advanced > inbox is set to 'Inbox for different account:Local Folders', for all my > accounts, > so only local folders are displayed on the left side) > > If I right click a received message in any local folder, including the local > inbox folder : > "QuickFilters : create filter from message..." > I get an error : "Tried to create a filter 7 times, but didn't work out [and > more text]" > > Drag and drop gives the same error message. > > Attachment : Thunderbird Troubleshooting Information > > Also my extensions : > > Account Colors 9.1 true accountcolors@DW-dev > Address Close Button 1.3 true address_close_button@emak.org > Allow HTML Temp 3.7.4 true {532269cf-a10e-4396-8613-b5d9a9a516d4} > Classic Toolbar Buttons 1.4.8 true CSTBB@NArisT2_Noia4dev > Color Folders 1.1 true colorfolders@fisheater.com > ColumnsWizard 6.0.4 true columnswizard@micz.it > CompactHeader 2.1.0 true {58D4392A-842E-11DE-B51A-C7B855D89593} > ConfirmBeforeDelete 0.3.5 true {51fff70c-0f33-4769-b411-67bd86836012} > ConfirmFolderMove 1.1.2 true {c267db80-8a57-11da-a8d5-000a95be0946} > Custom Address Sidebar 1.1.1-let-fixed true asbcustom@gmail.com > DOM Inspector 2.0.15.1-signed true inspector@mozilla.org > Get All Mail Button Thunderbird 0.1 true > {0D4D76B0-657A-41b0-B3ED-60C638F4D97D} > Identity Chooser 1.9.3 true identitychooser@janek.org > Image Zoom 0.6.3.1-signed true {1A2D0EC4-75F5-4c91-89C4-3656F6E44B68} > ImportExportTools 3.2.4.1 true {3ed8cc52-86fc-4613-9026-c1ef969da4c3} > IsAdmin 2.5.1-signed true isadmin@vdtsoftware.ffext > Manually sort folders 1.1 true tbsortfolders@xulforum.org > NewScrollbars (aka NoiaScrollbars) 1.2.6 true > NoiaScrollbars@ArisT2_Noia4dev > No Message Pane Sorting by Mouse 1.2 true > nomessagepanesort@janek.org > Phoenity Buttons 0.57 true buttons@dillinger > quickFilters 3.4.2 true quickFilters@axelg.com > Restartless Restart 9.1-signed true > restartless.restart@erikvold.com > Show Address Only 0.1.9 true showaddressonly@rip238.selfip.com > Show InOut 1.1.4 true showInOut@ggbs.de > Signature Switch 1.6.13 true {2ab1b709-ba03-4361-abf9-c50b964ff75d} > Slim Add-ons Manager 14.1 true slimaddonmanager@opendfki.de > Thin Tabs 1.5.3 true thintabs@bonsaimind.org >
Created an attachment (id=8390) [details] 3.5 prerelease 76 created a modifieed manifest files that uses the older codebase for selecting backwards compatible SHIM code for Platform versions older than 47: content shimQuickFilters chrome://quickfilters/content/shimEcmaOld/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} content shimQuickFilters chrome://quickfilters/content/shimEcma/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} platformversion>=47 kind of tricky to test but ultimately the problem wasn't using local folders but my use of Object.entries which only exists in Gecko 47 and later.
(In reply to comment #2) > Created an attachment (id=8390) [details] [details] > 3.5 prerelease 76 > > created a modifieed manifest files that uses the older codebase for selecting > backwards compatible SHIM code for Platform versions older than 47: > > content shimQuickFilters chrome://quickfilters/content/shimEcmaOld/ > application={3550f703-e582-4d05-9a08-453d09bdfdc6} > content shimQuickFilters chrome://quickfilters/content/shimEcma/ > application={3550f703-e582-4d05-9a08-453d09bdfdc6} platformversion>=47 > > kind of tricky to test but ultimately the problem wasn't using local folders > but my use of Object.entries which only exists in Gecko 47 and later. > With quickFilters-tb-pb-sm-3.5pre76.xpi : * drag and drop now correctly displays the dialog window 'Create Filter', where a predefined or a custom filter can be selected. (and also the merging window if needed) Is it normal that without Pro version, 'Custom Variables' %from%, %from(mail)%, %to%, %to(mail)% etc... do not pre-fill the filter rules with the appropriate datas when selecting a custom template filter ? (the filtering rule appears but the third field, on the right, is empty) * right-click on a message 'QuickFilters : create filter from message...' still does nothing (not even an error message) Error console : error after triggering this context menu >Error: ReferenceError: e is not defined >Source File: chrome://quickfilters/content/qFilters-worker.js >Line: 1385 failing line 1385 in qFilters-worker.js : util.logException("createFilterAsync_New() failed: ", e);
(In reply to comment #3) > > With quickFilters-tb-pb-sm-3.5pre76.xpi : > > * drag and drop now correctly displays the dialog window 'Create Filter', where > a predefined or a custom filter can be selected. > (and also the merging window if needed) \o/ > > Is it normal that without Pro version, 'Custom Variables' %from%, %from(mail)%, > %to%, %to(mail)% etc... > do not pre-fill the filter rules with the appropriate datas when selecting a > custom template filter ? > (the filtering rule appears but the third field, on the right, is empty) no - if you have created a custom filter it should fill (provided you work from an email in the list and not email file; the email file has the limitations mentioned in comment #2 and isn't well tested at the moment. > > * right-click on a message 'QuickFilters : create filter from message...' still > does nothing (not even an error message) ok, I will investigate this. Haven't worked with Thunderbird 38 for maybe 2 years... there are so many test versions of Thunderdbird / SeaMonkey / Postbox for testing my 6 mail-compatible Add-ons I could turn this into an (unpaid) full time job. > > Error console : error after triggering this context menu > >Error: ReferenceError: e is not defined > >Source File: chrome://quickfilters/content/qFilters-worker.js > >Line: 1385 > failing line 1385 in qFilters-worker.js : > util.logException("createFilterAsync_New() failed: ", e); > that's a typo should have been catch(ex) { util.logException("createFilterAsync_New() failed: ", ex); } there is an underlying exception which would have logged correctly. I will try to reproduce it and upload a fix.
(In reply to comment #4) I don't see what is an 'email file'... I'm trying to right-click a message (which is in a local folder) > 'QuickFilters : create filter from message...', for a message in the message list (to the right of the folder tree, on the main Thunderbird Tab) After applying your fix on line [util.logException("createFilterAsync_New() failed: ", ex);] in qFilters-worker.js error console now logs : >Warning: createFilterAsync_New() failed: >undefined At least the error logging works. My two following options were set to False : extensions.quickfilters.debug.nostalgy extensions.quickfilters.nostalgySupport (I looked at function 'createFilterAsync_New' in 'qFilters-worker.js' which uses 'nostalgySupport' option...) However, setting them to True does NOT change the result, or the logging.
(In reply to comment #5) > (In reply to comment #4) > I don't see what is an 'email file'... neveer mind - I was referring to a different bug I was working on yesterday. (so a brain fart from me) your bug is quite more involved because of the way you have set up Local Inbox being the root folder for the other (POP mail) accounts. This actually leads to propblems finding filters that are defined on the POP mail account. Thereefore it took me the whole day to fix the filter search routine after I had fixed the issue you described in comment #4. I will upload a fixed version in the next attachment.
Created an attachment (id=8391) [details] 3.5 prerelease 84 I found the problem earlier today - the account iteration didn't work because I assumed the old code for Thunderbird needn't be there in the Shim (Mozilla dropped support of "for..in" in favor of "for..of" which makes older Gecko versions (Postbox) fail a syntax test even if they do not execute these lines. I found another problem though - when I determine the "source folder" which also puts the Filter in either of the Servers (specific mailbox, Local Folders), with this version if grabs the folder from the currently stored email (which is always the Local Folders Inbox). I believe it should use the correct originating Inbox (even though this is not visible in the folder tree) instead... I just noticed it when I tested the merge feature after installing the fixed version and it created a new filter in Local Folders (after I already had one in the real Inbox account) - you can see the accounts in the Message Filters list dialog. Local Folders might be neater if you want all your filters in the same place, even though the "original inbox" may be more correct. Normally the original accountKey is stored in the message header. The other question is whether the filters will actually *work* on incoming email if they are stored in Local Folders. If they do, they probably are executed *after* any filters in the original Inbox. If you pull an email from Local Folder/Inbox to another folder with assistant active it should now be created in the Local Folder server, however if you pull it from the POP3mailbox Inbox (if this is visible to you) then it should probably create the filter in that server. At least that was the behavior I observed on my mailbox, but I am not sure whether I created that filter before changing the advanced settings to storee in the other INbox and the "pop3 inbox / pop3 node" just vanished from the folder tree. So it may not bee an issue for you you might see all your filters under the "Local Folder" item in the filters list. The other thing which took me many hours to fix was the "find filters for this folder" functionality because it couldn't switch back to the correct account (the pop3 account) even though it showed up in the "Filters for" selection and had filters stored against it; it turned out I was using account.rootMsgFolder which always points to the Local Folders URI, thus I was never able to change to the pop3 server when I selected a search result. I solved it with the following snippet in the function selectFoundFilter(..) [qFilters-list.js:1932] let item = el.selectedItem, account = item.targetAccount, // change server to correct account (originating inbox) aFolder = account ? (MailUtils ? MailUtils.getFolderForURI(account.serverURI) : account.rootMsgFolder) : null; It works in thunderbird 38, obviously I still have to teset it in Postbox and modren Tb versions... The other thing is that I am using rootMsgFolder in quite a few places in code so I might have to do more sanity testing for your special case. Again nothing to worry if you store all your filters in the "Local Folders" account, but that's somehow untypical for the average Thunderbird user with multiple accounts. I still have to do some investigations on the custom filters, so let's leave the bug open until all issues are fixed.
Using quickFilters-tb-pb-sm-3.5pre84.xpi You solved 80% of the issues, from the user point of view. Tested with "Separated Message Storage" and "All Message Storage in Local Folders" *Context menu and drag and drop dialogs work : I get the 'create filter(merge)' dialog, and the 'create filter(new filter)' dialog *From context menu : the %from%, %to%... variables are correctly filled the new filter is created in the original receiving account (which seems the best), not in the Local Folders *BUT from drag and drop, from some Local Folder to some Local Folder : the %from%, %to%... variables are NOT filled (something is still missing here) the new filter is created in the Local Folders (could be logic since I'm moving a mail from a Local Folder to a Local Folder) *** Puting all message storage in Local Folders saves a lot of vertical space if you have many accounts. (It creates really unified Inbox/Draft/Sent/Trash/Outbox folders and removes useless Account lines in the tree) But indeed it's probably not a widely used trick. *** Personal opinion : *it should be made impossible to edit the prefix 'quickFilterCustomTemplate:', otherwise the filter stops to act as a template. (I guess quickFilters also prevent prefixed templates to be applied as if they were real active filters, or should the 'enabled' checkbox remain always unchecked for the templates ? I did that just in case...) *there could be a toolbar button to toggle drag-drop catching, without having to open the 'Message Filters' dialog window.
(In reply to comment #8) > Using quickFilters-tb-pb-sm-3.5pre84.xpi > > You solved 80% of the issues, from the user point of view. > > Tested with "Separated Message Storage" and "All Message Storage in Local > Folders" > > *Context menu and drag and drop dialogs work : > I get the 'create filter(merge)' dialog, and the 'create filter(new filter)' > dialog > > *From context menu : > the %from%, %to%... variables are correctly filled > the new filter is created in the original receiving account (which seems the > best), not in the Local Folders > > *BUT from drag and drop, from some Local Folder to some Local Folder : > the %from%, %to%... variables are NOT filled (something is still missing here) > the new filter is created in the Local Folders (could be logic since I'm moving > a mail from a Local Folder to a Local Folder) > > *** ok, I gotta obviously fix that one. Thanks for following up. > Puting all message storage in Local Folders saves a lot of vertical space if > you have many accounts. (I guess you are talking about the folder tree. I don't use it anymore as scrolling through it is a waste of time. I suggest using my Add-on QuickFolders and the quickJump/quickMove functionality instead - then there are no limitation about the number of folders and we can build a meaningful hierarchy, such as Customers/A-Z etc. I have made it my habit to never move mail to the folder tree anymore and also to not use it for folder navigation, which saves a lot of time. The hierarchy of storage should not be hindered by the need for navigation, a single vertical list is just not a good model for this.) > (It creates really unified Inbox/Draft/Sent/Trash/Outbox folders and removes > useless Account lines in the tree) > But indeed it's probably not a widely used trick. > > *** > > Personal opinion : > *it should be made impossible to edit the prefix 'quickFilterCustomTemplate:', > otherwise the filter stops to act as a template. I agree - but it is difficult. As I haven't implemented my own automatic storage system for filters I had to piggyback on what was available within the current (C++ determined = hard coded via compilation) model of filters; this is also a problem for my backup / restore functionality as I currently cannot implement timestamps. As regards hiding the custom templates in "Local Folders" I didn't actually know about the way you were using advanced account settings so I thought no "real" filters would be stored there in any "reasonable" setup. personally I am using another (dead) pop account for local storage (instead of Local Folders which I found counter intuitive for a long time. As I have local folders for all my mail accounts anyway, which are mirrored on IMAP or local only for POP3), but that's just a quirk of my particular mail setup. > (I guess quickFilters also prevent prefixed templates to be applied as if they > were real active filters, > or should the 'enabled' checkbox remain always unchecked for the templates ? It should stay unchecked - I haven't found a way of making this read-only but I think it is acceptable for an advanced user. > *there could be a toolbar button to toggle drag-drop catching, without having > to open the 'Message Filters' dialog window. There is. It is called "Activate the Filter assistant". Unless I misunderstood you.
Created an attachment (id=8392) [details] Summary Screenshot
>> *there could be a toolbar button to toggle drag-drop catching, without having to open the 'Message Filters' dialog window. >There is. It is called "Activate the Filter assistant". Unless I misunderstood you. OK solved : the button was present in the 'Mail Toolbar' (I hide this toolbar), but I was looking for the button in the 'Customize Toolbar' dialog... Also the button works as intended. >> *it should be made impossible to edit the prefix 'quickFilterCustomTemplate:', otherwise the filter stops to act as a template. >I agree - but it is difficult You can't change the name of the CustomTemplate, *just after it was edited*, to ensure that 'quickFilterCustomTemplate:' is still at the beginning of its name ? It would be even better to remove the prefix just before the CustomTemplate is edited, and re-add the prefix just after. Since you modify the 'Edit Filter' dialog, I thought it would be easy to take control of the input/output of '#FilterEditor #filterName .textbox-input-box' But I don't know much about programming Mozilla addons. >I thought no "real" filters would be stored [in "Local Folders"] in any "reasonable" setup With all my Addons, Userchrome, UserContent customizations, and other tweaks, my setup is certainly not reasonable, that's why I'm cautions while reporting a problem from an AddOn because it can be caused by my own setup. QuickFolders seems a much bigger AddOn than quickFilters, however my folder tree is not so big/complex that I would need it I think. I updated my review for quickFilters at https://addons.mozilla.org/en-US/thunderbird/addon/quickfilters/reviews/ I guess you will mark the BUG as fixed when you are satisfied with the fixes. (or will I have to do it myself ?) Attachment : a screenshot as a summary.
(In reply to comment #11) > >> *there could be a toolbar button to toggle drag-drop catching, without having to open the 'Message Filters' dialog window. > >There is. It is called "Activate the Filter assistant". Unless I misunderstood you. > OK solved : the button was present in the 'Mail Toolbar' (I hide this toolbar), > but I was looking for the button in the 'Customize Toolbar' dialog... > Also the button works as intended. Yes: I add it to that toolbar automatically on installation. So this kind of backfired for your case. (Maybe it is possiblee to check whether that toolbar is visible and omit it in that case) > > >> *it should be made impossible to edit the prefix 'quickFilterCustomTemplate:', otherwise the filter stops to act as a template. > >I agree - but it is difficult > > You can't change the name of the CustomTemplate, *just after it was edited*, to > ensure that 'quickFilterCustomTemplate:' is still at the beginning of its name > ? yes it would be possible (with some pain) I was thinking about that. Of course hiding it on the edit dialog (like you suggested in the screenshot) would be the best way. > It would be even better to remove the prefix just before the CustomTemplate is > edited, and re-add the prefix just after. > Since you modify the 'Edit Filter' dialog, I thought it would be easy to take > control of the input/output of '#FilterEditor #filterName .textbox-input-box' One of the problems is that I cannot fully control when the filters are saved (I have seen the "Cancel" button to be completely ignored so I would need to do intensive testing in order to avoid the string getting lost in some exceptional case. The safest way would be a separate edit box that and hide the original one and update it automatically from the active one. > But I don't know much about programming Mozilla addons. It's not pretty :) There are quite a few changes to the source code to remain compatible with versions 57,58,59, so I have to keep maintaining the code so the Add-ons keep working in newer versions. See also [Bug 26488] and [Bug 26441] > > >I thought no "real" filters would be stored [in "Local Folders"] in any "reasonable" setup > With all my Addons, Userchrome, UserContent customizations, and other tweaks, > my setup is certainly not reasonable, > that's why I'm cautions while reporting a problem from an AddOn because it can > be caused by my own setup. > > QuickFolders seems a much bigger AddOn than quickFilters, however my folder > tree is not so big/complex that I would need it I think. > I updated my review for quickFilters at > https://addons.mozilla.org/en-US/thunderbird/addon/quickfilters/reviews/ > > I guess you will mark the BUG as fixed when you are satisfied with the fixes. > (or will I have to do it myself ?) I mark as fixed once I release the new version to the public (soon). that way I can keep it in the version history as "fixed" without losing sleep over it.
>I have seen the "Cancel" button to be completely ignored Indeed, if I right-click a message 'create filter from message', then (in the first dialog) merge with a filter, then (in the second dialog) edit the filter, then in 'filter rules' (where a new rule has been added as expected, according to the chosen template) choose to 'Cancel', the filter is however modified with the new rule being added, despite my 'Cancel'. >The safest way would be a separate edit box that and hide the original one and update it automatically from the active one. Yes, I suppose a custom edit box for the filter name would give you complete control on its input/output content. I hope you would not have to recreate the whole 'Filter Rules' window, but only the edit name field within it. >Mozilla dropped support of "for..in" in favor of "for..of" >It's not pretty :) There are quite a few changes to the source code to remain compatible I would not like a script engine to change this kind of thing (language keywords or basic syntax) I only do amateur programming in VB, VBS, AutoIt, and I would not be happy to have to update all my loops some day. Note : your 'Create Filter' dialog window (the second one) auto-resize un-aesthetically when selecting different templates. Probably caused by the #templateDescription field auto-resizing with its content. It's unusual to have a top-level window auto-resizing while you are working inside it.
(In reply to comment #13) > >I have seen the "Cancel" button to be completely ignored > Indeed, if I right-click a message 'create filter from message', > then (in the first dialog) merge with a filter, then (in the second dialog) > edit the filter, > then in 'filter rules' (where a new rule has been added as expected, according > to the chosen template) choose to 'Cancel', > the filter is however modified with the new rule being added, despite my > 'Cancel'. Yes not quite sure but I believe it is a bug in the window by Thunderbird. They probably didn't test it much in windows. Mac / Linux di not have ok buttons, all changes are immediate. > > >The safest way would be a separate edit box that and hide the original one and update it automatically from the active one. > Yes, I suppose a custom edit box for the filter name would give you complete > control on its input/output content. > I hope you would not have to recreate the whole 'Filter Rules' window, but only > the edit name field within it. Definitely; I won't waste time re-inventing the wheel, that would take way too long. > > >Mozilla dropped support of "for..in" in favor of "for..of" > >It's not pretty :) There are quite a few changes to the source code to remain compatible > I would not like a script engine to change this kind of thing (language > keywords or basic syntax) > I only do amateur programming in VB, VBS, AutoIt, and I would not be happy to > have to update all my loops some day. Well, the underlying language itself (ECMAscript 1.7) has been updated. Also there are things like multiprocess browsing and tons of streamlining that makes it necessary to write a lot of "shim" code in order to satisfy all hosts / language flavors. > > Note : > your 'Create Filter' dialog window (the second one) auto-resize > un-aesthetically when selecting different templates. > Probably caused by the #templateDescription field auto-resizing with its > content. > It's unusual to have a top-level window auto-resizing while you are working > inside it. Yes but still better than having scroll bars. It's pureley cosmetic so it dopesn't bother me too much right now.
fixed in Release 3.5 - 03/05/2018