MozillaZine

TB 60: prompt service - alert,confirm duplicate text

User Help for Mozilla Thunderbird
cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted February 4th, 2019, 2:43 pm

While working to upgrade a couple add-ons, I have been looking everybody's update methods.
I have run into a problem that I am surprised have not been able to see posted anywhere else:

In localfolder there are several prompt service uses with prompt. Confirm(..)
both confirm and alert produce duplicated text. I have looked everywhere assuming I was doing something wrong , but everything matches. I also confirmed another recently updated add-on theme_and_font_changer has several prompt.alert messages. This also does the same thing.
This seems very basic but after lots of searches but I have not seen anyone else commenting on this.

The example:

var confirmRemoveAccount = "Are you sure you want to remove local folder: ";
let review = Services.prompt.alert(window, null, confirmRemoveAccount);

Produces alert text:

"Are you sure you want to remove local folder: Are you sure you want to remove local folder: "


Does this sound familiar/require a bug post to Thunderbird?

morat
 
Posts: 3338
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 4th, 2019, 4:10 pm

I tried the following code snippets in the error console. It works correctly for me.

i.e. Tools > Developer Tools > Error Console

Code: Select all
(function () {
  var dialogTitle = "My Title";
  var dialogText = "This is an example.";
  Services.prompt.alert(window, dialogTitle, dialogText);
})();

Code: Select all
(function () {
  var dialogTitle = "My Title";
  var dialogText = "This is an example.";
  var ok = Services.prompt.confirm(window, dialogTitle, dialogText);
  console.log(ok);
})();

nsIPromptService
http://dxr.mozilla.org/comm-central/sou ... ervice.idl

Thunderbird 60.5.0
Windows 7 SP1 32-bit

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted February 4th, 2019, 5:59 pm

very interesting...

Both JS prompts done in the console produce duplicated text also. Even more interesting
is that even:
alert("hello")
produces
hellohello

all the latest TB 60.5
I'm wondering if I should do a reinstall. But I can't finish the add-on's unless I fix or go to the trouble of using a dialog.

morat
 
Posts: 3338
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 4th, 2019, 6:17 pm

Try disabling all extensions, then restart, then run the code snippets in the error console again.

If the problem still occurs, then start the application in safe mode, then run the code snippets in the error console again.

Safe mode
http://support.mozilla.org/kb/safe-mode-thunderbird

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted February 4th, 2019, 8:19 pm

I had all extensions off. of course as soon as I disabled localfolder (the one I am updating) the problem goes away.
Somehow I think the extension is interfering with the component interface. just have to debug it. Appreciate the help.

As an aside - it looks like very very few add-ons have been updated, this is problematic for the community, no?

morat
 
Posts: 3338
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 5th, 2019, 9:28 am

cleidigh wrote:problematic for the community

Well most addons are no longer actively maintained and Mozilla keeps making big changes to the core code.

Mozilla wrote:Legacy extensions will not be around forever and possibly will not even make it to Thunderbird 68.

Legacy API for WebExtensions
http://thunderbird-webextensions.readthedocs.io/en/latest/legacy.html

Are all addons without a manifest.json file going to break in Thunderbird 68? Is Mozilla going to automatically convert workable addons to legacy compatible WebExtensions?

Even Kaosmos (best addon developer for Thunderbird) is calling it quits.

Kaosmos wrote:Thunderbird 60 will be the last release which some of my extension will be able to work with. The other extensions will not be updated for Thunderbird 60.

Addons by Kaosmos
http://freeshell.de/~kaosmos/index-en.html
http://addons.thunderbird.net/thunderbird/user/Paolo_Kaosmos/

Is Thunderbird dead and other FAQ
http://forums.mozillazine.org/viewtopic.php?f=39&t=366405

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted February 5th, 2019, 5:57 pm

I finally got it. Interesting, the original author had created a trace function that did an overlay commonDialog and called its own load function after doing trace output . I think somehow the interface combined the double calls, but it still seems odd. I'm going to clean up and post to the ATN. I don't think they seem to be reviewing add-ons very quickly, the message archive options add-on has been queued for some time.

I have been using Thunderbird for over twenty years as well as managing it for my wife's business. I really wanted to continue to succeed and I'm willing to help. I have a decent amount of time since I'm retired with a disability, but can program by voice. I've been contributing to Visual Studio code for almost two years and I wonder if an electron/chromium approach might make sense. I assume it's too late, just hope things continue well.

What is your take? What you think is the best way for me to contribute?
Thanks/cheers

tanstaafl
Moderator

User avatar
 
Posts: 45585
Joined: July 30th, 2003, 5:06 pm

Post Posted February 6th, 2019, 12:39 am

What is your take? What you think is the best way for me to contribute?

There has been no consensus or official decision after several years of discussion about whether to replace the current Thunderbird with a next generation Thunderbird that used web technologies (while still remaining a desktop email client). The default plan appears to be to stick with the current code base, converting many modules from C++ to Javascript, and to refactor the code as needed to pay off technical debt. The people who were driving the next generation efforts are no longer on the Thunderbird Council and/or not as active anymore, so the window for possibly using Electron/Chromium seems to have passed.

I'm not aware of a Electron-compatible runtime for Gecko. https://github.com/mozilla/positron died 2 years ago.

IMHO the best way you could contribute would be to take over a couple of popular Thunderbird add-ons that have either been abandoned, or are not going to be developed past version 60. You'd eventually need to rewrite them as WebExtension add-ons that use the experimental APIs that will initially be offered by some add-ons, and eventually adopted by Thunderbird once there is a consensus/review on what the final mail API should be. Unfortunately that means you'd be dealing with a moving target for a good while due to both the instability of the experimental APIs and ongoing changes in the Mozilla toolkit.

https://thunderbird-webextensions.readt ... ments.html
https://thunderbird-webextensions.readt ... index.html

The Thunderbird developers have talked about possibly merging 3 or 4 of the most popular add-ons such as ImportExportTools into Thunderbird so you'd need to be careful you don't pick one of those. I suggest you subscribe to the Maildev mailing list (most engineering discussions) via http://lists.thunderbird.net/mailman/li ... erbird.net , the tb-planning mailing list (discussions on how to improve Thunderbird) via https://mail.mozilla.org/listinfo/tb-planning and mozilla.dev.apps.thunderbird (good place to ask for help when developing an add-on) . They're not high traffic. You might go a week with no traffic on any of them and then get a flurry of posts.

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted February 6th, 2019, 11:17 pm

yes I've been reading all that, not entirely reassuring, but I really hope thatit will keep going.

Finally , I got local folder posted. tweaked it to also work with TB65

have to cleanup message archive options.

I'm going to look at another couple of add-ons to update. suggestions welcome, I think I will also post to check with others to not duplicate effort

I'm also joint groups thanks.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 9 guests