zotero 7 for developers

1,237 views
Skip to first unread message

Dan Stillman

unread,
Sep 23, 2022, 12:49:17 AM9/23/22
to zotero-dev
As close followers of Zotero on GitHub may have noticed, in recent
months we've embarked on a major project to update Zotero to run on
Firefox 102, up from Firefox 60. This will bring huge benefits for
Zotero users and many improvements for developers, but due to the many
Mozilla platform changes between the two versions it will require all
Zotero plugins to be updated and in some cases significantly rewritten.

You can read about the changes that will be required here:

https://www.zotero.org/support/dev/zotero_7_for_developers

The page includes links to developer builds of Zotero 7 for macOS and
Linux. We're still working on a Windows build, and hope to have it ready
soon, but we wanted to share what we have so developers can start
updating their plugins.

These builds are still incomplete in some major ways, so there's no need
to report general problems, but please let us know if you have any
questions or run into any problems while updating your plugins. (All
feedback should go in new threads on this list. Please don't post about
these builds to the Zotero Forums.) We'll update the linked page with
additional details and best practices as we address questions here.

We'd like to release a beta of Zotero 7 within the next few months, and
new hooks may need to be added to Zotero to support some previous
customizations, so I would recommend beginning to update your plugin and
providing feedback as soon as possible.

Thanks for bearing with us through this difficult transition. It will be
worth it!

- Dan

Emiliano Heyns

unread,
Sep 23, 2022, 10:43:03 AM9/23/22
to zotero-dev
Will all of the changes listed there also already work in the current release, so that I can work towards beta-compatibility from now on with a single code base?

Dan Stillman

unread,
Sep 23, 2022, 5:39:13 PM9/23/22
to zoter...@googlegroups.com
On 9/23/22 10:43 AM, Emiliano Heyns wrote:
> Will all of the changes listed there also already work in the current
> release, so that I can work towards beta-compatibility from now on
> with a single code base?

In Zotero 6, you mean? Some will, but many won't. Custom Elements, for
example, weren't available in Firefox 60. `new DOMParser()` wasn't yet
available in XPCOM code. `document.getElementsByAttribute()` →
`document.querySelectorAll()` you can obviously do now. You can stop
using `yield` in `DB.executeTransaction()` now. Etc.

You can use `Zotero.platformMajorVersion >= 102` to test for Zotero 7
and otherwise fall back to old code. (We should probably add
`Zotero.majorVersion`, but we currently only have `Zotero.version`
(e.g., "6.0.13") , which is a little more awkward to test against.)
Message has been deleted

Emiliano Heyns

unread,
Sep 26, 2022, 2:01:24 AM9/26/22
to zotero-dev
Can the ones that work with Zotero 6 marked as such? That will make transition easier.

Dan Stillman

unread,
Sep 26, 2022, 4:22:03 AM9/26/22
to zoter...@googlegroups.com
On 9/24/22 1:09 PM, XY Wong wrote:
> I've tested the bootstrapped plugin template and it works after some
> modifications. However, when I tried to add a menuitem to the
> #zotero-itemmenu, the menu collapsed in a strange way. After I disable
> the plugin and the menuitem is removed, the menu still keeps collapsed.

Best to start new threads with example code for anything not working.
But in this case you're just not using createXULElement() (third item in
the list of Mozilla platform changes).
Reply all
Reply to author
Forward
0 new messages