Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template that stopped working with Thunderbird Supernova Version 115.2.2 #379

Closed
informas opened this issue Sep 18, 2023 · 18 comments
Closed
Labels

Comments

@informas
Copy link

informas commented Sep 18, 2023

Until a few days ago, I had the following template working, the purpose of which was that when forwarding an email, I could add (at the beginning of the email) certain data from the original email.

[[SCRIPT=RemoveRecipients|all]]
[[SCRIPT=AddRecipients|to|myemail@mydomain.com]]

Received From:
[[ORGHEADER=received|\n\n]]

Desde:
[[ORGHEADER=from|\n]]

To:
TO:[[ORGHEADER=to]]
CC:[[ORGHEADER=cc]]
BCC:[[ORGHEADER=cco]]

To (by GetRecipients):
[[SCRIPT=GetRecipients]]

Subject:
[[ORGHEADER=subject|\n]]

Date: [[ORGHEADER=date]]

After updating Thunderbird Version 115.2.2 (Supernova) it stopped working for me.

Now when I selects the template from the QuickText menu, the first time I invoke it, only the "To" field is filled with the indicated value, but nothing is written in the body of the email.

If I call it a second time it inserts the template but with most of the data in blank.

It is as if the "GetRecipients" Script had not worked or the values for ORGHEADER were not assigned.

The only data that fills in the template on the second attempt is the "To" field, supposedly assigned on the first attempt.

And what is inserted in the body of the email is.

Received From:

From:

To:
TO:
DC:
CCO:

To (by GetRecipients):
To: myemail@mydomain.com

Subject:

Date:

Is this a bug or incompatibility with the new version of Thunderbird?
Any suggestions on how to solve the problem?

Thanks in advance.

@vbowden
Copy link

vbowden commented Oct 4, 2023

I now have this issue also after updating to Supernova. It's only happening on templates I've built on HTML.

@Heliophob
Copy link

Heliophob commented Oct 5, 2023

Hello,

My scripts also no longer work after the update.
This should, for example, get a number from the subject line:

var subject = this.mQuicktext.get_orgheader(["subject"]);
var pattern = /TID#([0-9]{6})/i;
var tid = pattern.exec(subject);
if (!tid)
var pattern = /TID#([0-9]{5})/i;
var tid = pattern.exec(subject);
if (!tid)
return ""; // gibt nichts zurück
else
return tid[1]; // gibt die TID zurück

### I get this error when running:
In Ihrem Quicktext-Skript ist ein Fehler aufgetreten: TID
TypeError: messenger.messageServiceFromURI is not a function
Zeile 609: undefined

@jobisoft
Copy link
Owner

jobisoft commented Oct 5, 2023

messenger.messageServiceFromURI no longer exists in Thunderbird core. You have to update your script to be compatible with TB115.

Source code is here:
https://searchfox.org/comm-central/source/

Looks like it is MailServices.messageServiceFromURI now.

@jobisoft
Copy link
Owner

jobisoft commented Oct 5, 2023

I stand corrected, this is in fact a bug in Quicktext. I wrongly assumed the incompatible code was part of your script, sorry.

@mejo-
Copy link

mejo- commented Oct 7, 2023

I have the same issue with Quicktext in Thunderbird 115.

@jobisoft
Copy link
Owner

jobisoft commented Oct 8, 2023

quicktext_5_12.zip
Can you check if this version fixes the issue?

@jobisoft jobisoft reopened this Oct 8, 2023
@jobisoft jobisoft added the fixed? label Oct 8, 2023
@Heliophob
Copy link

thank you for your quick support!

Unfortunately, only the error message is suppressed but the scripts (such as reading the subject line, like mine) are still not possible.

@mejo-
Copy link

mejo- commented Oct 8, 2023

Thanks @jobisoft! For me the same as @Heliophob reported. The error is fixed, but the scripts still don't work anymore. But probably another bug.

I see these logs in the console instead when trying to run the script in question:

[W] unreachable code after return statement [wzQuicktextVar.jsm:644:2](chrome://quicktext/content/modules/wzQuicktextVar.jsm)
[W] unreachable code after return statement [wzQuicktextVar.jsm:608:2](chrome://quicktext/content/modules/wzQuicktextVar.jsm)
[W] unreachable code after return statement [wzQuicktextVar.jsm:644:2](chrome://quicktext/content/modules/wzQuicktextVar.jsm)
[E] NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative [wzQuicktextVar.jsm:44](chrome://quicktext/content/modules/wzQuicktextVar.jsm)
    onStartRequest chrome://quicktext/content/modules/wzQuicktextVar.jsm:44
    preprocess_org chrome://quicktext/content/modules/wzQuicktextVar.jsm:1221
    process_orgheader chrome://quicktext/content/modules/wzQuicktextVar.jsm:1167
    get_orgheader chrome://quicktext/content/modules/wzQuicktextVar.jsm:469
    parseText chrome://quicktext/content/modules/wzQuicktextVar.jsm:186
    parse chrome://quicktext/content/modules/wzQuicktextVar.jsm:127
    AsyncFunctionNext self-hosted:852
    (Async: async)
    insertBody chrome://quicktext/content/quicktext.js:511
    insertTemplate chrome://quicktext/content/quicktext.js:351
    AsyncFunctionNext self-hosted:852
    (Async: async)
    windowKeyPress chrome://quicktext/content/quicktext.js:656
    load chrome://quicktext/content/quicktext.js:40

@Heliophob
Copy link

I see the following error in the console:

NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative wzQuicktextVar.jsm:44
No chrome package registered for chrome://cardbook/content/cardbookRepository.js
CURSOR LOG failedSearchAttempts : 1 quicktext.js:609:15

jobisoft added a commit that referenced this issue Oct 8, 2023
@jobisoft
Copy link
Owner

jobisoft commented Oct 8, 2023

Does this work?
quicktext_5_14.zip

I had to replace some ancient code with new stuff which may produce different return values for orgatt and orgheader. If it works, please test it for me in depth.

@mejo-
Copy link

mejo- commented Oct 8, 2023

Wow, the 5.14 version indeed fixes all issues for me. The scripts I have in place all work as expected again. Thanks a lot for the quick fix @jobisoft!

@jobisoft jobisoft closed this as completed Oct 8, 2023
@Heliophob
Copy link

Heliophob commented Oct 9, 2023

Unfortunately the update doesn't help in my case. There is the following error in the console:

No chrome package registered for chrome://cardbook/content/cardbookRepository.js
CURSOR LOG failedSearchAttempts : 1 quicktext.js:609:15

[OS = Ubuntu 22.04.3 LTS]

@informas
Copy link
Author

Also for me the new version of Quicktext, 5.14 from 10/08/2023 now works correctly. At least with Thunderbird version 115.2.2 64-bit
Thank you very much @jobisoft

@mejo-
Copy link

mejo- commented Oct 10, 2023

@jobisoft do you plan to release version 5.14 to the addon store anytime soon?

@jobisoft
Copy link
Owner

It is: https://addons.thunderbird.net/addon/quicktext/versions/

@vbowden
Copy link

vbowden commented Oct 10, 2023

Thanks so much, John! It works perfectly as before. I LOVE this add-on!

@Heliophob
Copy link

Is my error still in progress or should I create my own thread?

@jobisoft
Copy link
Owner

jobisoft commented Oct 10, 2023

Is my error still in progress or should I create my own thread?

Your error is probably related to CardBook. I assume the error goes away if you disable that extension. I think its author changed an interface which Quicktext was using.

Yes, please create a new issue for that specific error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants