zotero-mdnotes icon indicating copy to clipboard operation
zotero-mdnotes copied to clipboard

{{title}} not recognized for cases, missing from generated output

Open jonas-sk opened this issue 4 years ago • 6 comments

Describe the bug When exporting a case, the case name is not recognized as {{title}}, so the title is missing from the Markdown file

To Reproduce Steps to reproduce the behavior:

  1. Create a title that includes {{title}} or %(title)
  2. Create an item of type "case" in Zotero and add a title
  3. Click "Mdnotes" > "Export to markdown"
  4. Open the markdown file and notice the missing titles

Expected behavior The case name should be recognized as title and be included in the generated files, based on the template. AFAIK from working on Zotero pickers, case names are recognized as titles internally.

Desktop:

  • OS: MacOS Big Sur
  • Zotero version: v5.0.96
  • Mdnotes version: v0.1.3
  • Zotfile version: v5.0.16
  • BetterBibtex version: v5.2.124

Additional context Add any other context about the problem here.

jonas-sk avatar Mar 04 '21 23:03 jonas-sk

Hi @jonas-sk, does it work if you add {{caseName}}? The full list of fields as exported from Zotero is here and how you can format them is here.

argenos avatar Mar 05 '21 20:03 argenos

It works when I include it! Although it is somewhat awkward to include in templates since an item can either have a title or a case name.

Not sure why, but wildcards seem to have stopped working now (I used them for aliases in Obsidian). Removing {{caseName}} doesn't help. Maybe it's connected to me modifying about:config: I added entries for caseName and docketNumber and changed the entries for the bullet and for tags.

jonas-sk avatar Mar 06 '21 15:03 jonas-sk

It’s alright if you include both as placeholders in the template; if nothing matches them they will be ignored. Wildcards are NOT ignored however.

Check if your new entries are valid JSON! If they aren’t, it will probably stop the export!

argenos avatar Mar 07 '21 08:03 argenos

Thanks! The placeholders I used are %(title), %(author) or %(caseName), but no placeholders work anymore. They simply stopped working after I changed the above about:config settings. And the Zotero items all have the respective fields filled out.

image

jonas-sk avatar Mar 07 '21 18:03 jonas-sk

I suspect there is a problem with your modified JSON strings, have you checked them in an online JSON validator?

argenos avatar Mar 07 '21 18:03 argenos

I don't see anything immediately obvious from your screenshot (it looks like valid JSON). Does it also happen if you remove the docketNumber? I would try modifying one at a time to catch which one is causing problems.

argenos avatar Mar 18 '21 16:03 argenos