Autocorrect addon - not working since v60.3.1

User Help for Mozilla Thunderbird
Post Reply
User avatar
Energise
Posts: 334
Joined: January 4th, 2008, 3:11 pm
Location: Suffolk, UK

Autocorrect addon - not working since v60.3.1

Post by Energise »

I'm a very old user of autocorrect and, up until a couple of days ago, I was still using the mms_auto_correct 1.0.5-tb.xpi but as soon as Thunderbird updated to v 60.3.1, it's not compatible. :(

I would like to open the file to see the coding as I have a feeling an edit may just solve the issue.

So, can someone please tell me how I can open the file to read the contents, please, or direct me to the site where the code is visible etc.

Many thanks
Julie
lasardo
Posts: 182
Joined: September 9th, 2018, 1:41 pm

Re: Autocorrect addon - not working since v60.3.1

Post by lasardo »

An xpi file is really just a zip file, so you can either use a command prompt to rename it to mms_auto_correct 1.0.5-tb.zip and use any unzip tool to unzip it, then if you make changes zip it back up and use command prompt to rename it back to .xpi, or you can see if your unzip software is smart enough to just try it without renaming it.
7-zip is a free and open source program that can unzip.
The review posted oct 11 here https://addons.thunderbird.net/En-us/th ... t/reviews/ says that just bumping the install.rdf is not enough.
Many old extensions can be installed by setting strictcompatibility to false as described here https://support.mozilla.org/en-US/questions/1234193 but apparently autocorrect is not one of them.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Autocorrect addon - not working since v60.3.1

Post by tanstaafl »

Try setting extensions.strictCompatibility false using the config editor at tools -> option -> advanced -> general. That will let you install/use it, whether or not it actually works depends upon what APIs it depends upon.

You can typically edit the max version (em:maxVersion) that a add-on supports in the install.rdf file included in the *.xpi file (basically a renamed .zip file). Try opening it using 7-Zip, right click on install.rdf, chose Edit, and then edit it in Notepad. After you save the file and close Notepad 7-zip should ask you whether you want to replace the file in the archive with the edited version. Open and Open Inside (alternatives to Edit) don't seem to work as well.
User avatar
Energise
Posts: 334
Joined: January 4th, 2008, 3:11 pm
Location: Suffolk, UK

Re: Autocorrect addon - not working since v60.3.1

Post by Energise »

Thanks guys

I had hoped, in my naivety, that it would just need a simple change to include the current version!!! Not so, I've found ;)

Hopefully, someone will be able to solve this issue before too long. I just wish I was knowledgeable re programing etc ;)

Thanks very much, though. I always appreciate the help and advice given here :)
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Autocorrect addon - not working since v60.3.1

Post by morat »

The unpack property is set to true in the install.rdf file, but the files are not unpacked in the extensions folder. The issue is the cause of the error in the review posted on oct 11.

install.rdf unpack property
http://developer.mozilla.org/docs/Archi ... sts#unpack

Remove unpacked extension support
http://bugzilla.mozilla.org/show_bug.cgi?id=1372696

mms Auto Correct
http://addons.thunderbird.net/thunderbird/addon/430090
User avatar
Energise
Posts: 334
Joined: January 4th, 2008, 3:11 pm
Location: Suffolk, UK

Re: Autocorrect addon - not working since v60.3.1

Post by Energise »

Hi morat

Thanks for posting. Unfortunately, you've totally lost me re your last post. I'll obviously need to read up the links you've posted to see if I can understand better.

Many thanks for trying. It's not your fault that I'm not up to this level of stuff. However, I'll give it a read! ;)
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Autocorrect addon - not working since v60.3.1

Post by tanstaafl »

That add-on is a renamed .zip file. He is suggesting that you edit the install.rdf file in it and change <em:unpack>true</em:unpack> to <em:unpack>false</em:unpack>. Use 7-zip to open the *.xpi file (right click on it in windows explorer, select 7zip and then "open archive"), select the install.rdf file, right click on it, select edit. That will launch Notepad. Edit the file, save the results and close Notepad. That will display a prompt asking if you want to replace that file with the edited version. Say yes.

I tried that. The problem is that there seem to be additional incompatibilities, at least under windows 10 using version 60.3.1. When I bring up that add-ons options I get a "The autocorrect file could not be loaded, check the JavaScript Console for reason(s)" popup error. The error console contains:

Fri Nov 30 2018 17:32:06 GMT-0500 (Eastern Standard Time) CH: Current logLevel: 1
mmsAutoCorrect: e-[Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFileInputStream.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://autocorrect/content/settings.js :: loadFileBegin :: line 73" data: no]

"Capitalize first letter of sentence" does seem to work. The replacement of bad or misspelled words (cna is changed to can and dont to don't) doesn't work.
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Autocorrect addon - not working since v60.3.1

Post by morat »

The extension requires unpacking, but the developers removed unpacking support so you would have to manually install the extension. I think that's too difficult for most users.

Here is the fix for the original xpi file.

* install.rdf

Code: Select all

- <em:version>1.0.5</em:version>
+ <em:version>1.0.5.1</em:version>

Code: Select all

- <em:maxVersion>52.0</em:maxVersion>
+ <em:maxVersion>60.*</em:maxVersion>
* chrome\content\autocorrect\autocorrect.js

Code: Select all

- mmsAutoCorrectGlobals.disabled = but.checked;
+ mmsAutoCorrectGlobals.disabled = !but.checked;

Code: Select all

- mmsAutoCorrectGlobals.prefBranchInternal = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
+ mmsAutoCorrectGlobals.prefBranchInternal = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
Here is how to manually install the hacked xpi file.

* create "autocorrect@miller.micro" folder in extensions folder
* unzip hacked xpi file into "autocorrect@miller.micro" folder
* start application
* check allow this extension
* click continue button
* click restart thunderbird button

Here is how to test the extension.

* open compose window
* paste "THis is changed to This"
* type "."

I fixed the autocorrect button. I guess it was buggy in Thunderbird 52.
User avatar
Energise
Posts: 334
Joined: January 4th, 2008, 3:11 pm
Location: Suffolk, UK

Re: Autocorrect addon - not working since v60.3.1

Post by Energise »

morat

Many thanks for these detailed instructions. I'll work on this over the weekend and see how I get on. I'll let you know if I manage it ;)

I really appreciate all this help
Julie
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Autocorrect addon - not working since v60.3.1

Post by morat »

You can edit the install.rdf and autocorrect.js files with Notepad.

The install.rdf and autocorrect.jar files are in the mms_auto_correct-1.0.5-tb-windows.xpi file.

The autocorrect.js file is in the autocorrect.jar file.

The .jar and .xpi files are renamed .zip files.
Energise wrote:I really appreciate all this help.
You're welcome.
Post Reply