Skip to content

Zotero8 hot fix#49

Open
rbpasker wants to merge 2 commits intoretorquere:masterfrom
rbpasker:master
Open

Zotero8 hot fix#49
rbpasker wants to merge 2 commits intoretorquere:masterfrom
rbpasker:master

Conversation

@rbpasker
Copy link

This allows ZFI to run on Zotero8. It's not meant as a permanent fix because it requires patching some underlying libraries that are also not Z8 compatible. Rather, it's meant to point the way to an official release once the dependencies are fixed.

Zotero 8 is based on Firefox 140 which removed several deprecated APIs.
This commit updates the plugin to work with Zotero 8.0.1+.

Changes:

bootstrap.ts:
- Remove non-existent locale registration (locale/en-US/ doesn't exist)
- Remove non-existent FTL file loading (folder-import.ftl doesn't exist)

content/folder-import.ts:
- Replace Zotero.MenuManager and ztoolkit.Menu APIs with direct DOM manipulation
- Use doc.createXULElement() to create menu item
- Insert menu item after "Import from Clipboard" in File menu
- More reliable across Zotero versions

content/debug.ts:
- Replace zotero-plugin logger with simple Zotero.debug() wrapper
- Avoids deprecated ChromeUtils.import() calls

esbuild.js:
- Update zotero-plugin imports: 'rdf' → 'make-manifest', 'version' → 'make-version'

tsconfig.json:
- Add "moduleResolution": "bundler" for proper module resolution
- Add "skipLibCheck": true to skip type checking of declaration files

package.json:
- Add patch-package for automatic patching of dependencies
- Update zotero-plugin-toolkit to 5.1.0-beta.13
- Update zotero-types to 4.0.5 (stable)

patches/zotero-plugin-toolkit+5.1.0-beta.13.patch:
- Fix ChromeUtils.import() → ChromeUtils.importESModule() in toolkit
- Patch basic.js: Console.jsm → Console.sys.mjs
- Patch pluginBridge.js: AddonManager.jsm → AddonManager.sys.mjs

Fixes retorquere#46, retorquere#47, retorquere#48
@retorquere
Copy link
Owner

Before anything else: I appreciate the effort, and that you just want this to work. I've pushed changes to make the plugin z8 compatible and released a new version. I did some light testing and it seems to work. I am severely backlogged and am dealing with stuff in my personal life that eats up a lot of time I would usually spend on the plugins.

I am however not merging this PR, and given the comment you placed with the PR, I think you somewhat expected this. Some of the reasons are:

  • it removes the use of zotero-plugin-toolkit for menu creation, which is explicitly undesirable. I hate UI work so am avoiding HTML stuff whenever I can.
  • it makes cosmetic changes which clutter the diff unnecessarily
  • it pulls in a beta version of zotero-plugin-toolkit without explanation
  • it then patches the beta without explanation

@retorquere retorquere closed this Jan 31, 2026
@rbpasker
Copy link
Author

yes, its not meant to be merged. its in case anyone is blocked by V8, and it gives you an idea of what kind of work needs to be done

@github-actions github-actions bot reopened this Jan 31, 2026
@retorquere retorquere moved this to In progress in Zotero plugins Jan 31, 2026
@github-project-automation github-project-automation bot moved this from In progress to Backlog in Zotero plugins Jan 31, 2026
@retorquere retorquere closed this Jan 31, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zotero plugins Jan 31, 2026
@retorquere
Copy link
Owner

Alright. I understand beggars can't be choosers, but for any future PRs (even ones that are not intended to be merged), it would save me review time if it only made required changes, and not cosmetic changes like replacing zotero-plugin-toolkit for menu creation. I did not have to update anything about that to have it work for me in 0.0.10.

@rbpasker
Copy link
Author

rbpasker commented Jan 31, 2026

I couldn't get it to work otherwise. js/ts and browser internals is not my forté. sigh, commenting reopens it. sorry

@github-actions github-actions bot reopened this Jan 31, 2026
@github-project-automation github-project-automation bot moved this from Done to Backlog in Zotero plugins Jan 31, 2026
@retorquere retorquere moved this from Backlog to In progress in Zotero plugins Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants