argenos / zotero-mdnotes

A Zotero plugin to export item metadata and notes as markdown files
https://argenos.github.io/zotero-mdnotes/
GNU General Public License v3.0
1.34k stars 81 forks source link

Customized placeholder does not work with Zotero 5.0.96.3 #155

Closed whytong closed 2 weeks ago

whytong commented 2 years ago

Describe the bug Tried to set up a customized placeholder so the exported markdown file can be used in Obsidian for bibliography aggregation, but the customized placeholder is ignored.

To Reproduce I followed the "Zotero/MDNotes/Obsidian/Dataview" workflow. It is a long post but the relevant steps are in section 3 of the first post. Steps to reproduce the behaviour:

  1. In the Zotero Config Editor, add this setting, name: extensions.mdnotes.placeholder.yamltitle, value:{"content":"{{field_contents}}","zotero_field":"title","link_style":"no-links"} and save, restart Zotero just in case.
  2. In the Zotero Metadata Template.md file where Mdnotes setting is located, add the following line in the YAML header: {{yamltitle}}
  3. In Zotero, find a reference, invoke Mdnotes, and do Export to Markdown (MdNotes is set to export split files).
  4. The title of reference is not included in the exported markdown file.

Expected behavior The title should be included in the YAML header in the exported markdown file.

Desktop (please complete the following information):

Additional context Change to Zotero intrinsic placeholders, such as DOI, works. Just the customized placeholder does not work.

whytong commented 2 years ago

OK, found out customized placeholder only works in 0.2.0 alpha or above not in 0.1.3

nicolascoffman commented 2 years ago

Same issue, but no success trying to upgrade to 0.2.0 alpha4. Here is the configuration I attempted.

extensions.mdnotes.placeholder.publicationTitle;{"content":"{{bullet}} Journal: {{field_contents}}", "link_style": "wiki"}

I've removed Mdnotes from Zotero's Add-on manager, then installed the alpha, but it says that it's still 0.1.3 (Though modified on March 10).

This seems to be the relevant debug output:

(4)(+0000001): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [320, 'https://www.frontiersin.org/articles/10.3389/fpsyg.2017.00065/full']

(3)(+0002784): Error: 

Edit: I've also attempted to reset the change in config (no longer appears) and downgrade back to 0.1.3, but can't get mdnotes to export note anymore.