stefanopagliari / bibnotes

359 stars 30 forks source link

[Bug] citeKey does not work in custom template #156

Closed theowoo closed 1 year ago

theowoo commented 1 year ago

In the current version, {{citeKey}} does not behave as expected.

stefanopagliari commented 1 year ago

@theowoo I do not seem to be able to replicate the issue. Below are a couple of screenshots.

CleanShot 2023-01-24 at 21 43 22@2x CleanShot 2023-01-24 at 21 42 51@2x

Can you maybe share a json with the entry where this problem occurs? You will need to change the extension to txt

sutzig commented 1 year ago

Outside of the note title property, the cityKey is not working for me when using custom templates either. The following

# {{title}}
{{citeKey}}
{{citationKey}}

returns

image

Attached is the generated .json files saved with a txt extension.

data.txt

stefanopagliari commented 1 year ago

@sutzig Thank you. the file that you shared is partial since it does not have any reference included. Would you be able to export one reference from Zotero and share the json?

sutzig commented 1 year ago

Sorry, I misunderstood. Attached the please find the json file generate for this reference. FWIW: I'm using Zotero 6.0.2.0.

linnman2018SocialStatisticManaging.txt

stefanopagliari commented 1 year ago

@sutzig I was not able to replicate the issue. Here is a screenshot of the template and the result. Which version of Bibnotes are you using? Please upgrade to the latest version if you have not done this yet

CleanShot 2023-01-30 at 18 04 11@2x CleanShot 2023-01-30 at 18 04 56@2x
sutzig commented 1 year ago

Thanks for your time looking into this issue, @stefanopagliari. I just relauched/updated Obsidian to v1.1.9 (sorry, I didn't realize I was a few versions behind). The BibNotes Formatter plugin was v0.9.2. I removed that plugin, downloaded the zipfiles from your github, and extracted to the plugins/.obsidian directory (which created a bibnotes-master).

image

I relaunched Obsidian. It sees the plugin, but fails to load

image

I spun up a new vault and added the bibnotes-master to the plugins/.obsidian directory and got the same response: Obsidian sees it, but can't load it.

theowoo commented 1 year ago

@stefanopagliari I can confirm everything works after removing and re-adding the plugin. I am using BRAT and had "auto-update at startup" turned on, so I just assumed it was up-to-date. Thank you for looking into this.

stefanopagliari commented 1 year ago

@sutzig You need to only copy the main.js and manifest.json of the latest release: https://github.com/stefanopagliari/bibnotes/releases/tag/0.9.217

But the easiest way to update the plugin is by using the plugin BRAT and adding the repository of bibnotes there

sutzig commented 1 year ago

@stefanopagliari Thank you for patience and clarification. I loaded the correct file and, as @theowoo reports, everything is working. I wasn't familiar with BRAT, but will look into it.

I am grateful for your work in creating and maintain this fantastic plugin!

stefanopagliari commented 1 year ago

Thank you. I will close the issue