Skip to content

Zotero Figure does not show context menu or UI on Zotero 7 (Linux, v0.2.5–0.2.7) #104

Description

@bertomat

Environment

  • OS: Linux (Zorin OS 17.3)
  • Zotero version: 7.0.27 (stable)
  • Plugin version(s) tested: 0.2.5, 0.2.6, 0.2.7 (and self-built from main)
  • Java version: openjdk 21.0.4 (tested OK with java -jar pdffigures2.jar)
  • pdffigures2.jar: Works correctly when run standalone.

Problem

The plugin installs successfully and initializes (confirmed via the Zotero Error Console), but it does not add any visible UI elements — no “Extract Figures” item in the right-click context menu on PDF attachments, and no Tools → Zotero Figure entry.

The extension appears in Zotero’s Add-ons list and loads without errors.
Console output during startup shows only:
patching getField zoterofigure.js:397
patching setField zoterofigure.js:397
patching isFieldOfBase zoterofigure.js:397

but no registration of menu items.

Running Zotero.ZoteroFigure in the developer console confirms:

  • The plugin is alive ("alive": true)
  • All modules (UI, Menu, Reader) are initialized
  • But commands and Menu.elementCache are empty, indicating that no menus were registered.

Manually invoking
await Zotero.ZoteroFigure.hooks.onMainWindowLoad(window);
completes successfully but does not create any UI elements.

Rebuilding from source (npm install && npm run build with Node 20) and reinstalling the XPI produces the same behavior.

Expected behaviour
After installation and restart, a context menu item (Extract Figures) should appear when right-clicking a PDF attachment, or a toolbar/button/menu entry should allow figure extraction.

Additional notes

  • This behavior occurs identically on Ubuntu and Fedora.
  • The problem persists across 0.2.5–0.2.7 releases and the latest commit from main.
  • Appears to be related to Menu.register() or UI initialization timing — possibly a regression introduced during the Zotero Plugin Toolkit 3.0 migration.
  • Running pdffigures2.jar manually works as expected

Request
Please verify menu registration on Zotero 7 Linux builds and re-enable or delay Menu.register() to ensure UI elements are added after main window load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions