MAFF Extension Problem

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

Faust

MAFF Extension Problem

Post by Faust » 2016-01-26, 20:42

I just updated to PM 26 and all of a sudden I'm encountering this issue with the Mozilla Archive Extension. If I try and load a saved .maff file, it causes all of the browser tabs to reload continuously, making the interface almost completely unresponsive in the process. The extension was working for me just a few hours earlier when using PM 25.8. Could this be related to a known issue with the GUI posted here (viewtopic.php?t=9293)?

User avatar
back2themoon
Knows the dark side
Knows the dark side
Posts: 3135
Joined: 2012-08-19, 20:32

Re: MAFF Extension Problem

Post by back2themoon » 2016-01-26, 21:40

.maff files won't open for me too in v26, although there's no automatic tab reloading. I just get the "You have chosen to open" window and if I select Open With Pale Moon the same window reappears.

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-28, 01:12

I have managed to get MAFF and MHT to display, but I cannot get the dialog up for saving

To at least get Pale Moon to display MAFFs you need to change a file in the xpi, folder: chrome\content\startup\

Edit startupInitializerObject.js and find the lines:

Code: Select all

Gecko-Content-Viewers
Change to

Code: Select all

Goanna-Content-Viewers
Unfortunately the save page as will not function, the browser console displays 2 errors:

Code: Select all

aSkipPrompt.mafEventListener is undefined @ chrome://maf/content/integration/contentAreaUtils.js:244

Code: Select all

TypeError: aSkipPrompt.saveDir is undefined @ chrome://maf/content/integration/contentAreaUtils.js:249
Perhaps someone else knows what is going on?

TSMARll
Moongazer
Moongazer
Posts: 7
Joined: 2015-12-15, 03:38
Location: USA

Re: MAFF Extension Problem

Post by TSMARll » 2016-01-28, 07:30

I’ve been using both the installed and portable versions of Pale Moon 25.8 (Atom, XP builds) and all the MAFF functions were working fine. With Pale Moon 26 I can still save files in the .maff format, but I can no longer open them. On my XP system Pale Moon crashes shortly after selecting a .maff file to open.

joe04

Re: MAFF Extension Problem

Post by joe04 » 2016-01-28, 19:12

I came here because I too have the exact same problem.

MC & other devs: If edrtf20's hack of changing the "gecko" label to "goanna" works around 26.0.0's failure to open maff/mht archives resulting in a browser crash, is it possible for the new Goanna engine to translate this for legacy (i.e. frozen) extensions? I have no idea what collateral this could entail, but thought I'd ask just in case a Goanna fix could restore this very useful MAFF functionality.

BTW, my workaround is simply open MAFFs in my frozen Firefox v41. PM v26 still saves them just fine, as others have noted.

blind12
Moon lover
Moon lover
Posts: 77
Joined: 2013-03-01, 23:19
Location: home

Re: MAFF Extension Problem

Post by blind12 » 2016-01-28, 23:54

TSMARll wrote:I’ve been using both the installed and portable versions of Pale Moon 25.8 /.../ and all the MAFF functions were working fine. With Pale Moon 26 I can still save files in the .maff format, but I can no longer open them.
Same here. I can save but cannot open.

The MAFF extension's menu items are also partially broken (buttons with no text, "visit website" has no effect etc).


The MAFF extension is actually the primary reason I use Firefox/Palemoon.
This, and the fact that the real Opera died, so there's no way back now.

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-29, 01:39

See this post first: viewtopic.php?p=76370#p76370

OK, here's how to get a working MAFF extension, it will require you to use version 3.0.3, later versions of the extension just have the change listed as "Change: Compatibility with the latest versions of Firefox and SeaMonkey." and the betas seem to be for multi process firefox. https://addons.mozilla.org/en-US/firefo ... /versions/

So, to get Pale Moon to display .MAFF and MHT you will need to do as previously instructed:
Edit the xpi, in the folder: chrome\content\startup\ Edit the file startupInitializerObject.js and find the line:

Code: Select all

Gecko-Content-Viewers
Change to

Code: Select all

Goanna-Content-Viewers
Next, to actually save the archives you need to:
Open the xpi, in the folder: chrome\content\integration\ Edit the file contentAreaUtils.js
Delete the lines:

Code: Select all

  // Checks if the host application runs a platform version prior to Gecko 18.
  var platformVersion = Cc["@mozilla.org/xre/app-info;1"]
   .getService(Ci.nsIXULAppInfo).platformVersion;
  var isSeaMonkey = Cc["@mozilla.org/xre/app-info;1"]
   .getService(Ci.nsIXULAppInfo).ID == "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
  if (Cc["@mozilla.org/xpcom/version-comparator;1"]
   .getService(Ci.nsIVersionComparator).compare(platformVersion, "17.*") <= 0) {
    aCacheKey = aSkipPrompt;
    aSkipPrompt = aInitiatingDocument;
    aInitiatingDocument = {};
  }
Also delete the lines:

Code: Select all

else {
    // Normal saveDocument calls will save HTML and XHTML documents in archive,
    // unless we are on SeaMonkey where the save dialog may not be displayed.
    mafPreferSaveArchive = !isSeaMonkey && aDocument &&
     (aDocument.contentType == "text/html" ||
     aDocument.contentType == "application/xhtml+xml");
  }
I cannot be sure if this works fully, but most, if not all, features seem to work. (Don't forget to disable the updates for the extension if you try this.)
Last edited by edrtf20 on 2016-01-29, 03:33, edited 2 times in total.

Faust

Re: MAFF Extension Problem

Post by Faust » 2016-01-29, 02:16

I'm glad to see that I'm not the only one that lost the functionality of the MAFF extension in PM 26. I have reverted back to PM 25.8.1, and the extension seems to be working as before. I'd be interested in knowing how well the edits provided by edrtf20 might work in PM 26. For me, I'm a little gun-shy about trying 26 again, since the transition to goanna seems to have also broken Download Status Bar. I do hope they get this fixed soon, since the rendering engine does seem to have a lot of promise.

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-29, 02:24

I would upload a copy of the edited extension for you to try, but I know that the PM team prefer to keep edited addons off the forum to prevent it getting out of control.

blind12
Moon lover
Moon lover
Posts: 77
Joined: 2013-03-01, 23:19
Location: home

Re: MAFF Extension Problem

Post by blind12 » 2016-01-29, 03:00

MAFFs seem to open just fine with this hack, but all Palemoon Save actions are completely disabled, be it via Ctrl-S, main menu, MAFF addon menu or rightclick context menu.
So no saving MAFFs or anything else.

Since Palemoon 26 has introduced a bunch of issues, what's the correct procedure to downgrade? Uninstall (keep settings,backup profiledir), install old?

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-29, 03:08

MAFFs seem to open just fine with this hack, but all Palemoon Save actions are completely disabled
Did you do/try the second part of the edits?
Next, to actually save the archives you need to:
Open the xpi, in the folder: chrome\content\integration\ Edit the file contentAreaUtils.js
Delete the lines:

Code: Select all

  // Checks if the host application runs a platform version prior to Gecko 18.
  var platformVersion = Cc["@mozilla.org/xre/app-info;1"]
   .getService(Ci.nsIXULAppInfo).platformVersion;
  var isSeaMonkey = Cc["@mozilla.org/xre/app-info;1"]
   .getService(Ci.nsIXULAppInfo).ID == "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
  if (Cc["@mozilla.org/xpcom/version-comparator;1"]
   .getService(Ci.nsIVersionComparator).compare(platformVersion, "17.*") <= 0) {
    aCacheKey = aSkipPrompt;
    aSkipPrompt = aInitiatingDocument;
    aInitiatingDocument = {};
  }
Also delete the lines:

Code: Select all

else {
    // Normal saveDocument calls will save HTML and XHTML documents in archive,
    // unless we are on SeaMonkey where the save dialog may not be displayed.
    mafPreferSaveArchive = !isSeaMonkey && aDocument &&
     (aDocument.contentType == "text/html" ||
     aDocument.contentType == "application/xhtml+xml");
  }

blind12
Moon lover
Moon lover
Posts: 77
Joined: 2013-03-01, 23:19
Location: home

Re: MAFF Extension Problem

Post by blind12 » 2016-01-29, 03:10

No. Attention deficit syndrome at its finest : )

EDIT: MAFF seems to work fine after both edits and restarts. Thanks.

Now to other quirks of PM 26.
Last edited by blind12 on 2016-01-29, 03:30, edited 1 time in total.

DonDamm

Re: MAFF Extension Problem

Post by DonDamm » 2016-01-29, 03:14

@edrtf20, that simple change from Gecko to Goanna did the trick in x64! Thank you for that. In mine the file is StartupInitializer.js. trying to edit it through 7-Zip in place may case an Access Denied. Remember you have to close the browser first. Best to copy the xpi file (mine is {7f57cf46-4467-4c2d-adfa-0cba7c507e54}.xpi to a different folder, copy out the js file, edit it copy it back to the xpi file and then copy the modified xpi file back to the \content\startup folder. That way you can work on it and not worry about messing up the original before it's done right.

Fortunately, it seems to save okay for now. Also my status bar seems intact. I did center the title bar as per a current post. Much better!

@Moonchild, thank you for all the effort you put into this project over the years. It is majorly appreciated! Tak bra! :^)

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-29, 03:19

OK, it seems like taking the 3.1.2 version and doing the goanna edit works without messing with the other files. Could have sworn that it didn't work earlier!

So to fix the issue, edit the 3.1.2 xpi:

Open the folder: chrome\content\startup\ Edit the file startupInitializer.js and find the line:

Code: Select all

Gecko-Content-Viewers
And change it to

Code: Select all

Goanna-Content-Viewers

joe04

Re: MAFF Extension Problem

Post by joe04 » 2016-01-29, 04:16

Unfortunately this method doesn't work for me. Tried the above instructions for 3.0.3 and 3.1.2 but same result: attempting to open an existing .maff (either via "open" dialog box in PM or double-click in Windows explorer) yields a blank tab. The browser no longer crashes, but still no dice.

For now, I'm going back to the regular MAFF 3.1 I've been using for a while, which will crash on opening but at least still saves .maffs properly. Then I can open them in FF.

I have a dozen other addons, all working properly just like they did in PM 25, so perhaps there's some dependency there.

Hopefully MC or another dev can provide insight into what's going on and provide a Goanna "accomodation" for this so that the regular AMO .xpi can be used just like in PM 25.

blind12
Moon lover
Moon lover
Posts: 77
Joined: 2013-03-01, 23:19
Location: home

Re: MAFF Extension Problem

Post by blind12 » 2016-01-29, 04:32

edrtf20 wrote:So to fix the issue, edit the 3.1.2 xpi:

Open the folder: chrome\content\startup\ Edit the file startupInitializer.js and find the line:

Code: Select all

Gecko-Content-Viewers
And change it to

Code: Select all

Goanna-Content-Viewers
Works here, thanks again.

Off to tacle ugly tabs and image lazyload.

TSMARll
Moongazer
Moongazer
Posts: 7
Joined: 2015-12-15, 03:38
Location: USA

Re: MAFF Extension Problem

Post by TSMARll » 2016-01-29, 06:32

joe04 wrote:Unfortunately this method doesn't work for me. Tried the above instructions for 3.0.3 and 3.1.2 but same result: attempting to open an existing .maff (either via "open" dialog box in PM or double-click in Windows explorer) yields a blank tab. The browser no longer crashes, but still no dice.
Same here using 3.0.0 and 3.1.2 on Atom XP build - the browser no longer crashes but still can't open .maff files.

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-29, 07:31

What other extensions, if any, are you using?

joe04

Re: MAFF Extension Problem

Post by joe04 » 2016-01-29, 22:17

Enter Selects and TabMixPlus are the ones that could be interfering with tab opening, but both are far more important to me than opening Maffs in PM

edrtf20

Re: MAFF Extension Problem

Post by edrtf20 » 2016-01-30, 06:21

I tried the edited xpi with both of those extensions and it works for me, so it must be something else. What other extensions do you have installed? Also you could try something that might give an answer to what is going on.

Make sure that you have the edited xpi installed first

If you use the blue Pale Moon menu, go to: web developer, browser console. Otherwise go to the tools menu and do the same thing. Then open a MAFF file and post what appears (in the console right click, select all. copy. Paste it using the "Code" button when posting a reply) you may want to remove any personal information (names etc.)