diegodlh / zotero-cita

Cita: a Wikidata addon for Zotero with citations metadata support
GNU General Public License v3.0
233 stars 12 forks source link

1.0.0-beta.7 adds menu item every time plugin is renenabled within the same launch session #306

Closed brierjonOU closed 1 week ago

brierjonOU commented 1 week ago

Describe the bug Each time the plugin is enabled it adds an additional menu entry from the right click drop-down, but it never removed the menu from the previous enabled session until Zotero is restarted.

Once restarted the additional menu items no longer appear, the affect is only within the session where the plugin was disabled and re-enabled.

When the Cita plugin is disable the right click menu will not trigger and display at all until a restart of Zotero.

To Reproduce Install the beta and enable. 1 menu item for Cita appears when right clicking on a title. Disable the plugin and reenable 2 menu items will show as a duplicate. This can be repeated to have a number of Cita menus.

Expected behavior When enabling Cita, check if a menu item for Cita is not already present and/or prompt for restart of Zotero on enable or disable action.

Screenshots I'd already disabled and re-enabled multiple times, 6 menu items in this example image Enabled and disabled twice image image Now 8 menu items image

Environment:

Additional context Only plugin is Cita beta.

Reproduction I disabled and re-enabled not exactly in the session, there is one more disable and enable sequence in this debug log vs the photos. Cita-1.0.0-beta7-menu-DebugOutput.txt

I've submitted the debug to Zotero too if that reference is not a Cita issue without a forum post. Noting the log submission ID: D801754359 if it would expedite the attention for Zotero Dev needs.

brierjonOU commented 1 week ago

Related to #257

Dominic-DallOsto commented 1 week ago

Thanks for the detailed error report!

I think this is a duplicate of #302 which will be fixed once we merge in #300 (hopefully soon!)