PKM-er / obsidian-zotlit

A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.
https://zotlit.aidenlx.top
MIT License
674 stars 29 forks source link

[Bug] Citekey is undefined #372

Open WvW-vOiDs opened 3 months ago

WvW-vOiDs commented 3 months ago

Some items don't have its citekey, even if the citekey is defined in Zotero. PixPin_2024-08-18_13-34-15

The versions of the software and plugins are:

I think it may be the same bug as #303.

Finally, thanks for the amazing plugin. It really helps me a lot.

WvW-vOiDs commented 3 months ago

One more thing, I'm using citekey as the title of the file, and it displays correctly. This is exactly the opposite of #245. image

matar3 commented 3 months ago

I'm having similar issue. I can't cite documents in obsidian by using the syntax [@ because when i click on the article found in the drop-down menu, it writes "[@undefined]", and if i click on it just creates a new note named "undefined". It is happening to me with the article "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4110052/", that has a very long title name, but the issue persists even after renaming the title in zotero. It's strange because i'd already used zotlit to cite this same article in obsidian, and it previously wrote this hyperlink [@@abdelmalekEstimatedAlbuminExcretion2014] but now if i click on it i see an error message saying "Citekey abdelmalekEstimatedAlbuminExcretion2014 not found in Zotero". However, i checked in Zotero and the article has quite that citekey, so can't understand why it doesn't find it. Immagine 2024-08-18 184321 Immagine 2024-08-18 184522

Immagine 2024-08-18 185148 Immagine 2024-08-18 185024

Immagine 2024-08-18 185433

WvW-vOiDs commented 3 months ago

I’m not sure what happened, but it seems to be working now. I’m sure that the versions of all plugins and software haven’t changed. I just closed and reopened Zotero and Obsidian, reloaded the plugins in Obsidian, and deleted and recreated the note. After that, it worked!

image

Hope that will help you.

matar3 commented 3 months ago

It did work also for me! Thank you @WvW-vOiDs very much for your help! I did same things, and even if i'd done several tries even before posting here on github, this time it worked! Yet, we're still not figuring out what happened. I guess a change can have happened in the name of the md note file: before it was named "10.1053_j.ajkd.2013.10.061.md", whereas now it is named "abdelmalekEstimatedAlbuminExcretion2014.md" (i.e. has the same name of the citation key). Another hypothesis is that when opening the info of the md file in obsidian zotero side view some kind of sync happened and corrected the issue.