jannessm / joplin-zotero-link

8 stars 5 forks source link

Unable to open the list of Zotero documents inside Joplin #17

Closed louisld closed 1 month ago

louisld commented 1 month ago

I am unable to open Zotero link dialog using z@. It used to work 2 weeks ago.

Inside the developer console, I get the following error each time I type a character inside the editor:

959:10 Uncaught (in promise) TypeError: t.cm.getTokenAt is not a function
    at <anonymous>:10:2571
    at Generator.next (<anonymous>)
    at <anonymous>:10:2215
    at new Promise (<anonymous>)
    at i (<anonymous>:10:1960)
    at <anonymous>:10:2499
    at CodeMirror5Emulation.signal (C:\Users\louis\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\editor\CodeMirror\CodeMirror5Emulation\CodeMirror5Emulation.js:122:13)
    at C:\Users\louis\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\editor\CodeMirror\CodeMirror5Emulation\CodeMirror5Emulation.js:147:42

I am using Zotero 7.0.8 and Joplin 3.1.20 (prod, win32) on Windows 11 with the following plugins:

AJSchiller commented 1 month ago

I'm encountering a similar error. I haven't been able to get dev console to work, but I get this popup when I type z@ in a note: image (Yes, Zotero is running and the relevand setting is enabled.)

I tried updating the plugin, as I notice v1.2.1 is available here, while the Joplin plugin repository still has only v1.1.1, but apparently I'm too much of a muggle to build from source (a little help, anyone?).

I am using Zotero 7.0.8 and Joplin 3.0.15 on Linux Mint 21.3 with the following plugins:

Edit: while investigating this issue, I realised that a newer version of Joplin was available. After updating to version 3.1.20, I get no response at all when I type z@, not even the above popup.

louisld commented 1 month ago

I think the issue come with the update from MirrorCode 5 to MirrorCode 6 since the function geTokenAt does not exist anymore in MirrorCode 6.

Enabling the legacy markdown editor inside the settings makes the plugin works again.

AJSchiller commented 1 month ago

Following @louisld 's suggestion, I am now back to my original problem - the plugin once again responds when I type z@, but the response is "Zotero not found" (as above). So I guess I'm experiencing a different issue.

jannessm commented 1 month ago

Thank you for your reports. I will keep you updated.

louisld commented 1 month ago

The extension works in Joplin 3.0.15 but breaks in 3.0.20. It must comes from a breaking changes between these two versions.

I am not familiar enough with Joplin code structure to find a solution but tell me if you need more details.

jannessm commented 1 month ago

The issue is now solved. Although, joplin does not provide an opportunity to render own html, the list is now a bit less prettier. Please check if this solved your issues.

louisld commented 1 month ago

Thank you it works perfectly fine with the update.

I think there is still one small problem inside the manifest file. The version is 1.1.1 instead of 2.0.0.

I saw the commit on the joplin github repo saying that it zotero plugin was updated but I don't know if the app will automatically update the plugin since it's the same version.

I downloaded it manually, and it shows as version 1.1.1 inside Joplin.

jannessm commented 1 month ago

thank you for the hint! I updated it ;).