Open sevegee-tech opened 1 week ago
please ignore the perplexity search ;-) thick fingers
please ignore the perplexity search ;-) thick fingers
You can edit your question on Github if you like :)
when you right-click those QF tabs, does it show a popup menu at all?
Hi, rght-click tab shows dropdown menu of all subfolders but selecting one doesn't display content - but go in to the TB sidebar, folders and the sub-folder is there with content. Note: this is not the case with all tabs - some work as expected (??) In settings, the folder (& subfolders) is sync'd
Just to confirm:
clicking on the subfolders in the dropdown doesn't open the subfolder in the tree? Can you look at error console when you click? (Ctrl+shift+J)
screenshot of the error log... thx
Cab you click on the SyntaxError to expand it? there should be a stack trace with line numbers to the right:
Here we have a little triangle on the left of any exception which shows the different functions that were called:
Here are 2 screenshots... does this give you what you need? Thanks in advance - Steve
The css errors don't do anything - I was interested in the red "Uncaught Syntax error: missing ) after argument list"
you can copy all or single messages via right-click:
For context "copy all messages" is usually best as it gives all context beforehand. especially if you delete the contents before you start testing:
First I cleared the Web Console Output, then I right clicked the tab and selected the subfolder 'carers' ; displayed the log and copied 'all' thx, steve
Uncaught SyntaxError: missing ) after argument list messenger.xhtml:1:92
QuickFolders 11:51:59.720 [604130 ms]
command event from popup - QI.clickHandler()
oncommand=QuickFolders.Interface.onSelectSubFolder('imap://cmgcheshire%40gmail.com@imap.gmail.com/Mum's Care/Carers',event)
label=Carers
tag=sub quickfolders-util.js:1302:13
QuickFolders 11:51:59.720 [0 ms]
Repeat event [sub] within 604130ms. quickfolders-util.js:1302:13
QuickFolders 11:51:59.721 [1 ms]
No emergency handler for this event type. quickfolders-util.js:1302:13
I'm "just a user" and not an expert on QF or TB, etc., however, it strikes me that the single quote in "Mum's Care" might not be legal. Even if it is legal, it might be problematic. I would never use a single (or double) quote in a filename or pathname. -- it would just be asking for trouble. Even if TB (IMAP or POP) allow it, or the o/s allows it, that does not mean that every other program will allow it and/or not run into problems with it.
??? Do any of the other not-functioning folders/paths contain any single quotes (or any other funky characters)?
Jay
I'm "just a user" and not an expert on QF or TB, etc., however, it strikes me that the single quote in "Mum's Care" might not be legal. Even if it is legal, it might be problematic. I would never use a single (or double) quote in a filename or pathname. -- it would just be asking for trouble. Even if TB (IMAP or POP) allow it, or the o/s allows it, that does not mean that every other program will allow it and/or not run into problems with it.
??? Do any of the other not-functioning folders/paths contain any single quotes (or any other funky characters)?
Jay
Good catch! going to so some testing with a similarly named folder, maybe we can reproduce it. And then raise a bug with Thunderbird, because they should be able to handle this by encoding the character.
Good catch! going to so some testing with a similarly named folder, maybe we can reproduce it.
Ok, I tried that, but couldn't cause an error. I enabled the following debug switches:
extensions.quickfolders.debug.events = true
extensions.quickfolders.debug.folders.select = true
@sevegee-tech you can enable the same via QF Settings >> advanced Tab >> click on the settings wheel beside Debug Mode. And then make a debug log with these additional settings.
(enabling debug mode logs additional information, the debug settings enable drilling down closer to the place where the exception is thrown)
My output shows that my IMAP account didn't mind a subfolder "Mum's care" and it didn't need to encode the single quote within the folder URI either:
QuickFolders {FOLDERS.SELECT} 15:41:9.11 [1200 ms]
QuickFolders_MySelectFolder: imap://thunderbirddaily67%40gmail.com@imap.gmail.com/addons/QF/Mum's care quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.12 [1 ms]
try to find open tab with folder... quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.12 [0 ms]
...folder is currently not open in any Tab. quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.12 [0 ms]
folder [Mum's care] flags = 134750228 quickfolders-util.js:1297:13
QuickFolders {EVENTS} 15:41:9.32 [20 ms]
FolderTreeSelect: event target = [object HTMLUListElement] quickfolders-util.js:1297:13
QuickFolders {EVENTS} 15:41:9.32 [0 ms]
FolderTreeSelect selecting folder Mum's care quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.33 [1 ms]
folderRow = [object HTMLLIElement] quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.33 [0 ms]
ensureFolderViewTab() quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.33 [0 ms]
parent row:
<li id="all-aW1hcDovL3RodW5kZXJi…WlsLmNvbS9hZGRvbnMvUUY=" class="total children" is="folder-tree-row" data-server-key="server1" draggable="true" role="treeitem" aria-expanded="true" aria-selected="false" aria-label="QF" title="QF">
quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.33 [0 ms]
Selecting folder via treeview.select(Mum's care)..
imap://thunderbirddaily67%40gmail.com@imap.gmail.com/addons/QF/Mum's care quickfolders-util.js:1297:13
[issue 351] TB115 - to do: ensureRowIsVisible().. quickfolders-util.js:1307:13
QuickFolders {FOLDERS.SELECT} 15:41:9.34 [1 ms]
setFocusThreadPane() quickfolders-util.js:1297:13
QuickFolders {FOLDERS.SELECT} 15:41:9.49 [15 ms]
focusing threadTree. quickfolders-util.js:1297:13
QuickFolders {EVENTS} 15:41:9.873 [824 ms]
event: FolderLoaded item:Mum's care quickfolders-util.js:1297:13
QuickFolders {EVENTS} 15:41:9.873 [0 ms]
iterateFolders()
for..of - found the item and calling payload function(null, folder): Mum's care quickfolders-util.js:1297:13
That was it... the single quote - brilliant - thanks
Here is a quickfix:
It's basically caused by the click command handler which injected the function like this:
this.setEventAttribute(menuitem, eventType,`QuickFolders.Interface.onSelectSubFolder('${subfolder.URI}',event)`);
// changed to:
this.setEventAttribute(menuitem, eventType,`QuickFolders.Interface.onSelectSubFolder("${subfolder.URI}",event)`);
.. this still shifts the problem: now it will happen if a folder name contains a double quote character :( Guess I have to rewrite this code at one stage and wire up proper event handlers...
To try out this version, download the zip file and then drag it into Thunderbird Add-ons Manager (without extracting)
This issue might also affect the quickMove command - we can click on an email in the list of mails to be moved:
it is expected to open in a new tab then. So I made another patch, but it seems that opening any message in a tab is currently also broken in Tb128!
Axel,
While it is odd that your testing example did not throw an error/exception during your testing, it may just be the apostrophe in "Mum's" simply ended the command (as I would have expected it to correctly do) and then it did not pay attention to anything else after that (which I would not have expected it to do; I would have expected an "what am I supposed to do with this text" exception).
I am glad the cause has been found.
However, I really hesitate to promote making the apostrophe "legal" because it is a really terrible idea to have an apostrophe as a legal character in a file/pathname. I come back to the concept that these are really file/pathnames and TB and QF are just making use of them... but other system functions/programs may also need to make use of them at various points in time (for example, copying/migrating an IMAP structure to a different computer) and having an apostrophe in the middle of all that could muck up such other functions.
I would much prefer that TB (and QF) simply not allow the entry of certain characters in the first place -- and that they put up a warning/error dialog box to inform the user. However, I doubt that others would agree with me on that.
But, if QF uses any kind of path validation module (does path exist, is path legal, etc.) I would suggest that QF screen for such and put up a warning/error dialog for the user and tell the user how to fix it.
Just my 2 cents worth (which is not worth very much these days).
Jay
I would much prefer that TB (and QF) simply not allow the entry of certain characters in the first place -- and that they put up a warning/error dialog box to inform the user. However, I doubt that others would agree with me on that.
But, if QF uses any kind of path validation module (does path exist, is path legal, etc.) I would suggest that QF screen for such and put up a warning/error dialog for the user and tell the user how to fix it.
we have no choice here: the user can actually generate folders which contain single quotes / double quotes in their names. In my quickfix it will still break with the double quote, but I feel that's a lot less likely to be picked (while not impossible). Long term, folder names really shouldn't matter and special characters should probably be escaped if they are used within a evaluated command.
This issue might also affect the quickMove command - we can click on an email in the list of mails to be moved: it is expected to open in a new tab then. So I made another patch, but it seems that opening any message in a tab is currently also broken in Tb128!
I raised #507 to handle this one.
OS: Linux Mint 22 TB: v 115 QF Pro: 6.7 Mail Svr: gmail
Top level tabs when rght clicked show list of subfolders : on some tabs, clicking on a subfoler shows content while others don't. I have compared folder properties but cannot find any differences - would appreciate troubleshooting help thx