zotero-better-bibtex: JSON-RPC method `item.export` no longer works with `libraryID` from the CaYW endpoint
Debug log ID
Z6NY6TWW-refs-euc
What happened?
I’m encountering an issue with the Obsidian Zotero integration, which is now unable to import items from any library other than the default “My Library”.
The integration relies on the Cite as You Write (CaYW) endpoint and works as follows:
- It queries the CaYW endpoint to search for a citation.
- It then calls the
item.exportJSON-RPC method, passing:- the retrieved
item.citationKeyas thecitekeysparameter - the corresponding
item.libraryIDas thelibraryIDparameter
- the retrieved
This flow previously worked as expected for both the main library and group libraries. However, since commit b2446a6047bbf4faaa1b8b16a5d359c5f5c998f5, the item.export call fails when used with any libraryID other than 1. The new parse logic, if (typeof id.library === 'number') library = libraries.find(lib => lib.id === id.library), ends up comparing lib.id (which is actually the groupID) against what should be the libraryID. As a result, the lookup fails.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Merge branch 'master' into gh-3246 — committed to retorquere/zotero-better-bibtex by retorquere a year ago
- Merge branch 'master' into gh-3246 — committed to retorquere/zotero-better-bibtex by retorquere a year ago
The issue with breaking the Obsidian Zotero Integration Plugin seems to be resolved.
OK, I will give it a look, but I am really busy today and the next two days are public holidays, so it might take me a minute…