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

Zotero 7 #248

Open
wshanks opened this issue Feb 16, 2023 · 45 comments
Open

Zotero 7 #248

wshanks opened this issue Feb 16, 2023 · 45 comments

Comments

@wshanks
Copy link
Owner

wshanks commented Feb 16, 2023

From the Zotero developer documentation:

All Zotero plugins will need to be updated for Zotero 7.

Zotero 7 plugins continue to be based on the legacy XUL/XPCOM Mozilla extension framework that provides full access to platform internals, but the Mozilla platform itself no longer supports this framework. All Firefox extensions are now based on the much more limited WebExtensions API shared with Chrome and other browsers, which provides sandboxed APIs for common integration points.

We have no plans to make similar restrictions in Zotero. However, due to the Mozilla platform changes, some integration techniques are no longer available, and all plugins will need to change the way they register themselves in Zotero.

I haven't tried to scope out how much work this requires. Luckily Zutilo is already a bootstrap extension so some of the transition steps have already been done. @qqobb do you have any interest in working on this? Since there has not been much activity in the repo recently, I think it would be simplest just to do a clean transition and not try to support 6 and 7 in the same branch.

@qqobb
Copy link
Collaborator

qqobb commented Feb 17, 2023

I haven't looked into the Zotero 7 update either. I can try to help with the transition, but I'm not sure how much I'll be able to do. Let's see if there's a good way to collaborate.

There are also a few minor (old) commits which I could still add to the Zotero 6 branch of Zutilo. I'll try to create related PRs this weekend.

@SR--
Copy link

SR-- commented May 25, 2023

Just to say that it would be great to have it compatible with v7

@redleafnew
Copy link

Will it be compatible with zotero v7? Zotero 7 beta was released.

@wshanks
Copy link
Owner Author

wshanks commented Jun 2, 2023

I made an attempt at following the plugin transition guide for Zotero 7 in the zotero7 branch. The current status is that it is possible to install the xpi file. However, some of the Zutilo code uses deprecated API's, so besides seeing Zutilo show up in the preferences pane and the Addons Manager all it does is produce errors right now. Definitely do not install it in a profile you care about because it currently makes the Tools menu unusable which then makes it difficult to open the Addons Manager and remove it.

In the best case scenario, there are just some deprecated function calls that be easily migrated to new functions. It is possible though that Zutilo could rely on something that does not have an easy replacement and more work is needed to update it. The next step is to run Zutilo, check the error console, address the error, and repeat until it gets to a usable state or a bigger issue is discovered. I can't make any guarantees about a timeline for getting Zutilo to work with Zotero 7. Others are welcome to try doing more work on the update if they want to.

@wshanks
Copy link
Owner Author

wshanks commented Jun 2, 2023

I played with it some more. I fixed the mangling of the Tools menu, so now it is safer to test because you can access the menu to remove it.

I also updated some other deprecated function usage. Now, the default item menu items (copy tags, paste tags, copy item, relate items) are all working. The preferences pane is not working. The next thing to do is get the preference pane working so that the other menu items / shortcuts can be tested.

@redleafnew
Copy link

Thanks for your hard working.

@danieltomasz
Copy link

There was some interesting discussion regarding issues with Zotero7 transition on BetterBibtex repository, migh be useful;
Is there any beta release to try and test?

@wshanks
Copy link
Owner Author

wshanks commented Jul 25, 2023

There was some interesting discussion regarding issues with Zotero7 transition on BetterBibtex repository, migh be useful; Is there any beta release to try and test?

No, I made one push of working on it back in June, but I have not come back to it so far. There is a zotero7 branch in the repo that has my latest attempts, but it is not working. I had asked some questions on the zotero-dev mailing list and got some replies, but I hadn't used those replies to get further so far.

@xuxinliang
Copy link

Thanks for your hard working.

@huachuman
Copy link

Thanks for your attempts at the update. As increasing numbers of developers are refusing to work on their addons for zotero 6 because it's near the end of its life, I am beginning to hold hope that those addons I consider core to Zotero usability will be ported to Z7, and a m particularly hopeful Zutilo will make the list.

@topps
Copy link

topps commented Feb 12, 2024

I certainly appreciate all your hard work on this and also how much more difficult it will be to fix, given that the framework is now very much more restricted.
To take the pressure off a little (and I hope this does not come across as unappreciative of your efforts), I have found a workaround for the most important function that Zutilo provided for me: copy item link.
This functionality is now also provided by https://github.com/windingwind/zotero-actions-tags and is compatible with Zotero 7. It is a bit finicky to work with the provided Javascript action scripts, and some will be uncomfortable with allowing 3rd party Javascript to interact directly with their machine. But it does work.
Thanks again for all your hard work.

@danieltomasz
Copy link

hi @topps if you need just (markdown) link, you can try use a markdown zotero translator as a workaround https://github.com/silentdot/zotero-markdown-translator/tree/main

@justinbrbooth
Copy link

Has there been any progress on this? I'm looking at switching to zotero for reading papers and being able to use proper keyboard navigation would be a huge plus

@bjohas
Copy link
Contributor

bjohas commented Aug 9, 2024

Zotero 7 has been released. @wshanks: Can I help with upgrading somehow?

@SR--
Copy link

SR-- commented Aug 9, 2024

Yeah, I tried installing on Z7, but it seems to be disappearing on Z7 restart.

@bjohas
Copy link
Contributor

bjohas commented Aug 9, 2024

Yes, plugins don't work for z7 by default but need to be explicitly upgraded....

@SR--
Copy link

SR-- commented Aug 9, 2024

Naturally, I have used the 'addon' content from the 7 branch as advised. The plugin loads OK but then does not reload on Zotero restart.

@joelparham
Copy link

joelparham commented Aug 9, 2024

Thanks for your continued development work. As a heavy user of Zotero, I am eager to have a Z7 compatible Zutilo as soon as possible.
(At least in the meantime I can still use Zutilo in Z6)

@wshanks
Copy link
Owner Author

wshanks commented Aug 9, 2024

@bjohas Yes, any help would be appreciated. On the zotero7 branch, I have done enough to get the plugin to load and have some functionality. It is able to add items to the item context menu and some of them work at least. I haven't tested all items, but I noticed at least paste tags did not work because it could not read from the clipboard but copy tags did work. The preferences window/pane is currently not accessible. It would be nice to fix that to make testing and using the plugin easier (but one can edit the preferences directly in the Firefox config editor). In a quick test, keyboard shortcuts did not seem to work but I haven't looked at them much yet (it would be nice to get the preferences UI working first).

@llity
Copy link

llity commented Aug 10, 2024

https://github.com/windingwind/zotero-plugin-template Using this framework makes development easier?

@wshanks
Copy link
Owner Author

wshanks commented Aug 10, 2024

I don't think that template helps because Zutilo is already written. https://www.zotero.org/support/dev/zotero_7_for_developers has a good guide for updating a plugin from Zotero 6 to Zotero 7. It just takes time to work through the changes.

I just pushed a change that gets the item menu preferences to appear in the Zutilo pane of the preferences window. It doesn't look great but it is functional and should make it easy to test which functions work. The main remaining steps to take for the Zotero 7 update are:

  1. Test each function to see if it still works and fix the broken ones (some might not make sense any more with the changes to Zotero).
  2. Convert the dtd files to ftl so that the strings appear properly in the preferences pane.
  3. Turn on the keyboard shortcut code (just commented out right now) and see if it works.

@bjohas
Copy link
Contributor

bjohas commented Aug 10, 2024

@wshanks - I'll have a look. It won't be fast, but with some colleagues we'll do some testing and see what we can fix.

@wshanks
Copy link
Owner Author

wshanks commented Aug 11, 2024

Thanks, @Dcrizz! I used your paste code in d89ad53. I didn't use the copy code since copy was already working. I am not sure if it is safe to rely on Zotero.Utilities.Internal though -- maybe we need to copy the code into Zutilo.

@bjohas Thanks -- if you want, you can post any progress as PRs like another user did in #270. I will keep chipping away at things as well and pushing to the zotero7 branch.

@wshanks
Copy link
Owner Author

wshanks commented Aug 13, 2024

I made some more changes to the zotero7 branch. Now all of the context menu items work like they did with Zotero 6. There is one issue I am trying to fix still -- some of the strings in the preferences pane always show in English instead of the translation when it is available.

I might make a new release with this functionality for Zotero 7. I haven't looked much at the keyboard shortcuts yet. They might require more work to update. The shortcut code is based on the old KeyConfig Firefox addon. I have used that in other contexts and had to switch to something else in higher versions of Firefox like Zotero is using now.

@wshanks wshanks pinned this issue Aug 26, 2024
This was referenced Aug 26, 2024
@TommyJazz93
Copy link

I would like to mention that there is a pb with zotero 7 branch (besides the fact shortcuts simply doesnt work, isn't it?): when I open a pdf in the pdf reader, i cannot select and copy text within the pdf using ctrl+C shortcut. It still works if the pdf is opened in a separate window (and not tab). It is very boring. If you change it you're my (wo)man! thks

@wshanks
Copy link
Owner Author

wshanks commented Aug 27, 2024

@TommyJazz93 So Zutilo is interfering with pdf shortcuts in Zotero 7? Strange -- something to look into more while working on the Zotero 7 updates.

@Dcrizz
Copy link

Dcrizz commented Aug 29, 2024

Thanks, @Dcrizz! I used your paste code in d89ad53. I didn't use the copy code since copy was already working. I am not sure if it is safe to rely on Zotero.Utilities.Internal though -- maybe we need to copy the code into Zutilo.

@bjohas Thanks -- if you want, you can post any progress as PRs like another user did in #270. I will keep chipping away at things as well and pushing to the zotero7 branch.

Sorry for the late reply!! No worries, to be honest, I don't know what I am doing really, I just messed around with it the original action tag a bit and got GPT to correct any errors I made!! I am not actually very competent at this stuff!!

@regis586
Copy link

Hi,
zutilo is indispensable to me :) As it is not - for the moment - compatible with Zotero 7, I've kept version 6.0.36 "under wraps" to continue using it. But this morning the same incompatibility message appeared with 6.0.36, and indeed it doesn't work any more? No doubt linked to the future version for Zotero 7.x?
Good luck to the developers for their excelent work...

@regis586
Copy link

I deleted the extension and reinstalled it with Zotero 6.0.36..and zutilo works (fine..) again...

@glennsandstrom
Copy link

I use Zutilo for tag management all the time and It would be great if a version working on Zotero 7 becomes avalaible. Thanks for all the good work.

Best,

Glenn

@mmyrte
Copy link

mmyrte commented Oct 4, 2024

Hi @wshanks - thanks for Zutilo! If I were you, I'd release a version as it stands, since the following menu items seem to work:

  • Copy tags
  • Remove tags
  • Paste tags
  • Relate items
  • Copy attachment paths
    • As opposed to the "Show attachment paths", this gives me the absolute paths of files, even under WebDAV management.
  • Copy creators
  • QuickCopy items
    • Might want to update the docs from "Default output format" to "Item format and Note Format, respectively" in case someone's looking for the exact string.
  • Copy select item links
    • I must have effed something else up in my Zotero, because I cannot actually follow the links. They look correct though.
  • Copy select collection link
  • Copy Zotero URIs + Open Zotero URIs / Copy Zotero URI (collection) (but needs change Wrong URI links when doing “Copy Zotero URIs”. Getting “Error 404 Page Not Found” in Zotero #268)
  • Create book section
  • Create book item
  • Copy item fields
  • Paste into empty item fields
  • Paste non-empty item fields
  • Paste all item fields
  • Paste item type

Unsure about the following / might not be working:

  • Show attachment paths (Named "Show attachments" in settings)
    • Simply shows Zutilo: showing path of attachment 1 of 2 / storage:index.html. Is this the intended function? I'm using webdav storage.
  • Modify attachment paths (Named "Modify attachments" in settings)
    • Likely also not working because of webdav; I'm getting Zutilo: item selection error
  • Modify attached URLs
    • Only seems to work with checkbox active for "Replace all instances"
  • Copy child items to relocate / Relocate copied child items
    • If I understand this correctly, it's supposed to copy the attachments on an item and move them to another item. The name "relocate" is ambiguous, is this a copy or move operation? In any case, it doesn't do anything I could detect.

Not tested

  • QuickCopy items to clipboard (alt 1. and 2.)
    • I don't have the time to set this up, sorry.

I would suggest that you rename the plugin from "Zutilo Utility for Zotero" to simply "Zutilo" in the manifest.json, because I'm getting an overflow in preferences:

image

@AshtoBashto
Copy link

While I wait for the 7.0 compatible version of zutilo... is there a way to get a zotero://select link from a zotero document in any other way? I'm pretty desperate

@schoukah
Copy link

@AshtoBashto I'm not sure where I found mention of this plugin but this does the trick for me while waiting for a compatible Zutilo release: https://github.com/windingwind/zotero-actions-tags#readme

@jan-glx
Copy link

jan-glx commented Oct 22, 2024

I just tested QuickCopy items to clipboard (alt 1 and 2) with the current 7er branch. It works fine. If you dont want to wait for release:
dowload a zip of the contents of the addon directory of the zotero7 branch, rename as .xpi & install

Link goes to a 3rd party tool that provides downloads of github repo directories as this is not provided by github
Instructions based on : https://github.com/wshanks/Zutilo/blob/zotero7/docs/DEVELOPERS.md

EDIT( to avoid notification nosie): I don't deserve to be mentioned in one line with wshanks in the comment below (see commit history)

@bmhj2
Copy link

bmhj2 commented Oct 24, 2024

I just tested QuickCopy items to clipboard (alt 1 and 2) with the current 7er branch. It works fine. If you dont want to wait for release: dowload a zip of the contents of the addon directory of the zotero7 branch, rename as .xpi & install

Link goes to a 3rd party tool that provides downloads of github repo directories as this is not provided by github Instructions based on : https://github.com/wshanks/Zutilo/blob/zotero7/docs/DEVELOPERS.md

Really pleased to find this - thank you. The loss of Zutilo has been the one thing making me sad since the Z7 update, so thanks @wshanks, @qqobb, @jan-glx, and others in this thread who've been working on it. Greatly appreciated.

@huachuman
Copy link

huachuman commented Nov 2, 2024

Interesting @jan-glx. Do you know a way to assign shortcut to, for example, quick copy item link? Currently the Shortcuts section seems to be empty and/or unresponsive...

also... it's been mentioned that

...when I open a pdf in the pdf reader, i cannot select and copy text within the pdf using ctrl+C shortcut. It still works if the pdf is opened in a separate window (and not tab)...

...interfering with pdf shortcuts in Zotero 7...

@wshanks @TommyJazz93 Are these issues still present with the link shared by @jan-glx ?

Because after installing it I don't seem to have any issues with ctrl+c in the pdf reader.

@wshanks any news on:

I haven't looked much at the keyboard shortcuts yet. They might require more work to update. The shortcut code is based on the old KeyConfig Firefox addon

? 😊

@jan-glx
Copy link

jan-glx commented Nov 3, 2024

I hadn't noticed or read about that copy issue – but it's awesome! It’s a feature, not a bug! Now, you can copy the citekey directly when viewing the paper in a built-in viewer tab, without needing to switch back to the list or manually copy it from the item pane 🚀.

Right-click -> Copy still works if you need it, and you can set another shortcut so that Zutilo doesn't override Ctrl+C.

I had set the shortcuts with the previous version, so I didn’t notice the glitch in the GUI. However, you can go to Zotero -> Edit -> Settings -> Advanced -> Config Editor to set your shortcuts.
image

The export=-ids can be discovered from extensions.zotero.export.quickCopy.setting, as explained elsewhere.

@TommyJazz93
Copy link

TommyJazz93 commented Dec 22, 2024

@huachuman, yes, the issue is still present with that link. Sorry guys, maybe I'm too noob, but I still have the problem of no copy shortcut on pdf viewer when zutilo plugin is activated. I didn't get if there is a solution to that, and what is that solution. Answer would be really appreciated

@sypianski
Copy link

sypianski commented Dec 26, 2024

Thank you for your work everyone, I can't wait to be able to use it.

@DJYeh
Copy link

DJYeh commented Dec 28, 2024

Am I understanding correctly that this plugin is currently not compatible with the latest version of Zotero? If so I suggest updating the README file. I spent almost an hour trying to troubleshoot before I found this post.

@01tot10
Copy link

01tot10 commented Dec 28, 2024

Am I understanding correctly that this plugin is currently not compatible with the latest version of Zotero? If so I suggest updating the README file. I spent almost an hour trying to troubleshoot before I found this post.

@DJYeh, just a regular user posting here, but I don't think you've wasted your time, as many users including me have been able to use the development version succesfully with Zotero 7. As far as I know, the feature set is still not at parity with the earlier Zotero version, but I've found everything that I need even from the current development version. Maybe skim over this thread to get an idea of the limitations, as well as for the install instructions. You are right, though, that the current state of affairs could be reflected more clearly e.g. at the README.md.

@joelwwh
Copy link

joelwwh commented Dec 31, 2024

Is there a way to get 'copy select link' to go straight to the correct sub-folder that stores the doc rather than just defaulting to the main library?

@ryanwwest
Copy link

I doubt it as there can be multiple sub-folders in which the corresponding item is stored. I don't know of any functionality to specify a particular sub-collection 'path'.

@chamomile93
Copy link

Am I understanding correctly that this plugin is currently not compatible with the latest version of Zotero? If so I suggest updating the README file. I spent almost an hour trying to troubleshoot before I found this post.

@DJYeh, just a regular user posting here, but I don't think you've wasted your time, as many users including me have been able to use the development version succesfully with Zotero 7. As far as I know, the feature set is still not at parity with the earlier Zotero version, but I've found everything that I need even from the current development version. Maybe skim over this thread to get an idea of the limitations, as well as for the install instructions. You are right, though, that the current state of affairs could be reflected more clearly e.g. at the README.md.

I agree that the README should reflect that the release version is not working with Zotero 7.x more clearly.

@acsr
Copy link
Contributor

acsr commented Jan 13, 2025

I updated Zotero to Zotero 7.1-beta.3+52c342b69 due to fix some selection issues in highlighting of text in snapshots.

In the Addon Manager I now got the error:
"Zutilo Utility for Zotero 3.10.1a1 is incompatible with Zotero 7.1-beta.3+52c342b69."

In the manifest.json there is a version pinning limiting to 7.0.:
"strict_max_version": "7.0.*"

Changing this string manually to
"strict_max_version": "7.*"
did not act as a workaround.

There is no qualified error what exactly is failing beneath the now "dirty fixed" version check.

I am aware of the purpose of this check and just want to report it for those using the "Zotero7 branch addon folder zip to xpi" hack. Before the interims version worked well except the keyboard shortcuts.

Question: Is there anything else necessary fo fix for 7.1.* Where should I look to debug addon install logs?
Is this worth a new ticket?

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

No branches or pull requests