hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.09k stars 81 forks source link

authors that use only one field appear as "undefined undefined" #172

Open Badwolf369 opened 2 years ago

Badwolf369 commented 2 years ago

Describe the bug Zotero items where the author is 1 field appear saying the author is "undefined undefined". With these items the author appears as {"literal":"Author Name"} in the JSON file

To Reproduce Steps to reproduce the behavior:

  1. Take an item in Zotero and open the panel to edit the attributes.
  2. To the right of the author, there is a small white rectangle to switch from 1 field to 2. Click it.
  3. Refresh the database in Obsidian and search for that item

Console output I'm not sure what to look for that would be relevant to this issue that I haven't already given you.

Expected behavior I expect the author to appear as "Author Name" not "undefined undefined".

Screenshots Showing the name as one field: image image Showing the name as 2 fields image image

Platform

Additional context This makes it impossible to search for an Item by the author when their name is a single field. Most of my items are also single-field names.

Badwolf369 commented 2 years ago

Additional note: Works fine with BibLaTeX, only problem is with CSL-JSON

glocalglocal commented 2 years ago

This makes it impossible to search for an Item by the author when their name is a single field.

This is certainly the case when the author is an organisation (eg 'European Union', 'OECD'). Hundreds such items here. Among other things, this means the plugin does not produce Authors that a plugin like Dataview or a simple search can find and handle.