Bugzilla@Mozdev – Bug 26232
Tagging fault: ToggleMessageTag is not a function
Last modified: 2017-03-24 07:23:27
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=8189) [details] Extract from TB Error Console When an email message has been selected and an attempt is made to assign a Tag to the message using the Tag icon in the Mail Toolbar, or Message,Tag from the Main Menu, or right-click,Tag from the context menu, then the attempt fails and the tag is not added. Examination of the Error Console contains the following message: TypeError:quickFilters.ToggleMessageTag is not a function" and includes a hyperlink to chrome://quickfilters/content/quickFilters.js Following the hyperlink points to 1298 of the quickFilters.js file, the content of that line being: quickFilters.ToggleMessageTag(tag, checked); The tagging function works again when the quickFilters addon is disabled and TB is restarted.
Created an attachment (id=8190) [details] better error console This is a patched version of error console which may come in useful. The console has context menus for select all / copy to clipboard so we can have text logs. It also has a filter for the Addons context (chrome) so you can leave out any "Content" related logs that may be created by invalid HTML in emails + web pages. I will also upload a newer version of quickFilters soon so we are on the same page. I assume the current error relates to quickFilters v3.1 released on 28/02/2016
Created an attachment (id=8191) [details] quickFilters 3.2 Prerelease 12 Added a fallback for when the ToggleMessageTag function could not be retrieved via util.getMail3PaneWindow() Please install and switch on the "debug" setting in quickFilters options, Advanced tab bottom right. Then toggle filter assistant and tag a message. I might add more debug messages to the next patched version if we still encounter the error
Hi Axel, Many thanks for your very quick response on this, and yes, the version of quickFilters I was using was 3.1 - my apologies for omitting that important detail from the original bug text. I have downloaded and installed console2-1.0a4.xpi and quickFilters-tb-pb-sm-3.2pre12.xpi as suggested, and restarted TB. I ticked the check box on the Advanced tab of the quickFilters preferences to enable debug mode, tiggled Filter Assistant, and tried tagging an email. With "All" options enabled in the error console, the only message logged was: Sat May 21 2016 13:08:00 Error: too much recursion Source file: chrome://quickfilters/content/quickFilters.js Line: 1312 which appears to be the same issue as described in Bug 26163. Following the link to the JavaScript file shows line 1312 as: quickFilters.ToggleMessageTag(tag, checked); which, from looking at the surrounding code, appears to be the same line of code as I noted in my initial comments. I am more than happy to run any further diagnostics or provide any additional information which you may need, just let me know. Best regards, Al
Created an attachment (id=8192) [details] quickFilters 3.2 Prerelease 13 Try this one. I think somehow the wrapped function is wrapped again which leads to recursion. Shouldn't really happen though. Can you try and capture / attach a full log (from Thunderbird startup) if it happens again. with console2 it should be no problem to catch it, quickFilters debug mode will ensure that I see better what's happening. If there are no relevant messages for qF, try opening any mail folder in a new window, this will restart the initialisation process for that "instance" of Thunderbird. thanks in advance Axel
Still no luck this time either, unfortunately. I installed the Prerelease 13 xpi file, and restarted TB from a DOS command line, using the -jsconsole switch. The error message generated on this occasion is back to the original message, namely: Error: TypeError: quickFilters.ToggleMessageTag is not a function I have extracted the error console contents, filtered using the text "quick", and saved them to a text file. As the text file contains some mildly personal information, I will email that file to you separately, if that is ok. Regards, Al
Created an attachment (id=8193) [details] quickFilters 3.2 Prerelease 17 New version with more detailed debug log. I need 2 tests a) starting up Thunderbird and just getting that log. Makes sure you disable debug mode in QuickFolders. Also, please right-click the debug option in quickFilters and only toggle the setting extensions.quickfilters.debug.listeners = true important: make sure to disable "Content" in Error Console, because that's a bunch of noise. being able to switch that off is one of my primary reason for using console2. b) with the same console settings as above: clear the log enable quickFilters assistant tag any email Again, full unfiltered log is appreciated. EXPECTED OUTPUT (a): quickFilters {LISTENERS} [logTime init] addTagListener() ---------- quickFilters {LISTENERS} 12:7:41.882 [0 ms] Wrapping ToggleMessageTag... ---------- quickFilters {LISTENERS} 12:7:41.883 [1 ms] typeof ToggleMessageTag =function adding flag... ---------- quickFilters {LISTENERS} 12:7:41.883 [0 ms] typeof ToggleMessageTag =function ---------- quickFilters {LISTENERS} 12:7:42.44 [161 ms] addTagListener() ---------- quickFilters 12:7:42.970 [466 ms] Util.VersionProxy() started. ---------- quickFilters 12:7:42.971 [1 ms] AddonManager.getAddonByID .. added callback for setting extensionVer. ---------- quickFilters 12:7:42.971 [0 ms] toggleCurrentFolderButtons() ---------- quickFilters {EVENTS} 12:7:42.972 [1 ms] quickFilters.onload - ends ---------- quickFilters 12:7:43.200 [228 ms] Util.VersionProxy() started. ---------- quickFilters 12:7:43.201 [1 ms] AddonManager.getAddonByID .. added callback for setting extensionVer. ---------- quickFilters {EVENTS} 12:7:43.201 [0 ms] quickFilters.onload - starts ---------- quickFilters {EVENTS} 12:7:43.201 [0 ms] setTimeout() - checkFirstRun ---------- quickFilters 12:7:43.201 [0 ms] toggleCurrentFolderButtons() ---------- quickFilters {EVENTS} 12:7:43.201 [0 ms] quickFilters.onload - ends ---------- quickFilters 12:7:43.595 [394 ms] AddonManager: quickFilters extension's version is 3.2.pre16 ---------- quickFilters 12:7:43.633 [38 ms] AddonManager: quickFilters extension's version is 3.2.pre16 ---------- quickFilters 12:7:44.44 [411 ms] =================quickFilters============== checkFirstRun() - attempt 1 ---------- quickFilters 12:7:44.44 [0 ms] firstRun = false - currentVersion = 3.2.pre16 - installed = 3.2. ---------- quickFilters 12:7:44.45 [1 ms] store installedVersion: 3.2. EXPECTED OUTPUT (b): quickFilters {LISTENERS} 12:16:45.495 [498919 ms] ToggleMessageTagWrapped() contextWin == win: true contextWin.quickFilters == quickFilters: true originalTagToggler == contextWin.quickFilters.ToggleMessageTag: true ToggleMessageTag == contextWin.quickFilters.ToggleMessageTag: false ---------- quickFilters [logTime init] remove replyto item from template list... ---------- quickFilters {LISTENERS} 12:16:46.526 [957 ms] addTagListener()
Created an attachment (id=8194) [details] TB console2 output for tests (a) & (b) Hi Axel, When I right-clicked the quickFilters debug option, the extensions.quickfilters.debug.listeners item did not exit, so I created it with a value of true. I ran the two tests as requested, with console2 Content disabled, and displaying only messages containing the string "quick" - text file with the content of both tests is attached. For test (a), I did notice some differences between my results and your expected results, the most notable being the absence of "setTimeout() - checkFirstRun" in my results. For test (b), my results showed originalTagToggler == contextWin.quickFilters.ToggleMessageTag: false whereas your expected results show originalTagToggler == contextWin.quickFilters.ToggleMessageTag: true Then my results throw up the message Error: TypeError: contextWin.quickFilters.ToggleMessageTag is not a function Hope this helps.
(In reply to comment #7) > Created an attachment (id=8194) [details] [details] > TB console2 output for tests (a) & (b) > > Hi Axel, > > When I right-clicked the quickFilters debug option, the > extensions.quickfilters.debug.listeners item did not exit, so I created it with > a value of true. :( :( :( if it doesn't exist then I must not have uploaded the correct test version. Because it needs to exist for testing as a default in the version I specifically created for this test. There are some additional optional logs that start with quickFilters {LISTENERS} which are switched on using that setting. But only if you have the correct revision of quickFilters. (are you sure you ran prerelease 17?) > > For test (b), my results showed > > originalTagToggler == contextWin.quickFilters.ToggleMessageTag: false > > whereas your expected results show > > originalTagToggler == contextWin.quickFilters.ToggleMessageTag: true > this one is significant. Will review in detail later. > Then my results throw up the message > > Error: TypeError: contextWin.quickFilters.ToggleMessageTag is not a function > > Hope this helps. >
I can confirm that it is definitely quickFilters 3.2pre17 which is installed, though I did notice in the expected output in Comment #6 that prerelease 16 was in use. Could that be the difference?
Fixed in Release 3.2