wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.53k stars 72 forks source link

Does not load for Zotero in separate/app tab or Zotero Standalone. #3

Closed wshanks closed 11 years ago

wshanks commented 12 years ago

Currently, Zutilo works fine when Zotero is used as a browser pane in Firefox. However, when Zotero is set to open in a separate tab or the app tab, Zutilo does not seem to be initialized properly. The item it adds to Zotero's actions menu (which launches Zutilo's preferences window) is not present and Zotero.Zutilo.init() is not called (a window load eventListener should launch it).

Some parts of Zutilo are being loaded though because its preferences window can still be accessed via the Addons Manager. Parts of this window are generated dynamically by methods of Zotero.Zutilo defined in zutilo.js, so it seems like the Zotero.Zutilo object is being created.

The issues are all basically the same with Zotero Standalone, except that it does not populate the preferences window. This might just be because Zutilo never loads properly and so never creates its preferences. Then when the functions that populate the preferences window try to access these undefined preferences it crashes.

wshanks commented 12 years ago

Fixed by changing the overlay in chrome.manifest to zoteroPane.xul.

wshanks commented 12 years ago

This issue has to be reopened because I just realized that Zutilo's extra items are not appearing in Zotero's item menu when Zotero is opened in a separate tab. As of the most recent commit (13a12738e8), the extra menu items do seem to appear and call their functions properly with Zotero in a browser pane and with Zotero Standalone.

wshanks commented 12 years ago

As far as I have been able to tell by testing, with Zotero in tab mode, all of Zutilo's code is executed exactly as it is in browser pane and standalone modes. All of Zutilo's functions are defined and work when called by some other means. When I query the document elements, I find a 'zotero-itemmenu' element with each of my functions as a childNode just as I would expect. The only that does not work is that these items do not appear when right-clicking in Zotero, despite the fact that they should are children of 'zotero-itemmenu' which is supposedly the menu shown when right-clicking.

wshanks commented 12 years ago

I have hopefully fixed this issue again with ba1e03217ef3. It seems like tab.xul and browser.xul both have all of the Zotero overlay within them. Within Zotero, document refers to the document in the browser, but when Zotero is in a separate tab, the document within the tab is the one that is displayed. Using Zotero.Zutilo.zoteroDocument() (which gets the document of the tab or browser depending on the value of the showIn preference) instead of document seems to solve the issues with the overlay not appearing.

hpb01 commented 11 years ago

I have been using Zutilo in combination with Zotero 4.0.8 in the separate tab mode and it worked very well for me - until recently when my Firefox updated to v22. Now I can only see the Zutilo menu (right click) in the browser pane mode, but no longer when I open Zotero in a separate tab.

Any chance of getting Zutilo back to work in the tab mode? I really like the features and the browser pane mode is not a great option on my screen ...

wshanks commented 11 years ago

I can't get to this for a few days, but I will look into it. What version(s) of Zutilo have you tried? A new one just came out last week on the Mozilla page, so I am just curious which recent upgrade broke the menu (Zotero, Firefox, or Zutilo).

hpb01 commented 11 years ago

Thanks for looking into this - I used the most recent version of Zutilo (downloaded/ installed it again yesterday).

I suspect that the upgrade to FF 22 created the issue ... at least I know that I used the copy tags functionality up until last week. And my FF updated from v21 to 22 one or two days ago.


From: willsALMANJ notifications@github.com To: willsALMANJ/Zutilo Zutilo@noreply.github.com Cc: hpb01 buse_hp@yahoo.com Sent: Friday, July 5, 2013 5:36 AM Subject: Re: [Zutilo] Does not load for Zotero in separate/app tab or Zotero Standalone. (#3)

I can't get to this for a few days, but I will look into it. What version(s) of Zutilo have you tried? A new one just came out last week on the Mozilla page, so I am just curious which recent upgrade broke the menu (Zotero, Firefox, or Zutilo). — Reply to this email directly or view it on GitHub.

wshanks commented 11 years ago

One quick fix is to use version 1.1.17 from Mozilla. I think the issue was created in version 1.2. Firefox checks for add on updates when you update it, so it is possible you updated to 1.2 at the same time as updating to Firefox 22.

Edit: you can get to old versions on addons.mozilla.org by scrolling to the bottom of the page and clicking on "versions". You will probably need to disable Zutilo's automatic updates in Firefox's add-on manager so that version 1.2 is not reinstalled. I will post here when there is a version of 1.2 that fixes this problem.

wshanks commented 11 years ago

Update on this: I think I understand the problem and how to fix it. Unfortunately, it is not a quick fix (not too bad, but it involves carefully modifying several pieces of the code). I am very busy with work at the moment, so it will probably be another week or two before I can get a working patch for this bug.

In the meantime, version 1.1.17 should work with the latest version of Firefox and still have the context menu items. The only downside is that you don't get the new features added in version 1.2.3 (functions for attaching pages and links to Zotero items and for saving Zotero items with or without attachments). An alternative option is just to use version 1.2.3. The context menu items will not show up, but the functions are still there, so you can still assign keyboard shortcuts to them with Keyconfig and use them that way.

hpb01 commented 11 years ago

Thanks a lot for looking into this! At the moment I continue to work with the version 1.2.3, switching between the different modes (separate tab vs. split tab). I will also try your suggestion re Keyconfig + shortcuts.


From: willsALMANJ notifications@github.com To: willsALMANJ/Zutilo Zutilo@noreply.github.com Cc: hpb01 buse_hp@yahoo.com Sent: Sunday, July 14, 2013 4:11 PM Subject: Re: [Zutilo] Does not load for Zotero in separate/app tab or Zotero Standalone. (#3)

Update on this: I think I understand the problem and how to fix it. Unfortunately, it is not a quick fix (not too bad, but it involves carefully modifying several pieces of the code). I am very busy with work at the moment, so it will probably be another week or two before I can get a working patch for this bug. In the meantime, version 1.1.17 should work with the latest version of Firefox and still have the context menu items. The only downside is that you don't get the new features added in version 1.2.3 (functions for attaching pages and links to Zotero items and for saving Zotero items with or without attachments). An alternative option is just to use version 1.2.3. The context menu items will not show up, but the functions are still there, so you can still assign keyboard shortcuts to them with Keyconfig and use them that way. — Reply to this email directly or view it on GitHub.

wshanks commented 11 years ago

Okay, the latest commit (6a10939) should fix the problems with Zutilo not loading when Zotero is open in a separate tab. I will hold off on submitting it to AMO for a little while to make sure that I have not overlooked any corner cases, but so far Zutilo seems to be working fine for me in the latest commit.

hpb01 commented 11 years ago

Great - and thanks for letting me know. I will try it out.


From: willsALMANJ notifications@github.com To: willsALMANJ/Zutilo Zutilo@noreply.github.com Cc: hpb01 buse_hp@yahoo.com Sent: Thursday, July 25, 2013 10:15 PM Subject: Re: [Zutilo] Does not load for Zotero in separate/app tab or Zotero Standalone. (#3)

Okay, the latest commit (6a10939) should fix the problems with Zutilo not loading when Zotero is open in a separate tab. I will hold off on submitting it to AMO for a little while to make sure that I have not overlooked any corner cases, but so far Zutilo seems to be working fine for me in the latest commit. — Reply to this email directly or view it on GitHub.

wshanks commented 11 years ago

By the way, the version of Zutilo that fixes this bug is now on addons.mozilla.org. It has not been approved yet (and probably won't be for a while), so it is not on the front page, but it is available here:

https://addons.mozilla.org/en-US/firefox/addon/zutilo-utility-for-zotero/versions/

herbie00 commented 7 years ago

Hi. Just to tell that the bug "zutilo not showing up on tab mod but showing up on pane mode" could still be there somehow. I've just encountered it. I tried to remove and resinta but it didn't fix it. I'm using

wshanks commented 7 years ago

It's probably more accurate to say that the issue came back rather than that it is still there. I can poke at it a little and see if there is an easy fix. I would sasy that I would definitely fix it, but it seems like Zotero 4 is at end of life (there have been no releases for Zotero 4.x since the first release for Zotero 5.x), so it's hard to justify fixing this vs. the other open issues.

wshanks commented 7 years ago

Sorry, I couldn't reproduce this. I used

and the Zutilo menu item showed up for Zotero in a separate tab.