Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: Unable to Import Standalone Notes Without Parent Item #397

Open
Jarartur opened this issue Nov 29, 2024 · 3 comments
Open

Bug Report: Unable to Import Standalone Notes Without Parent Item #397

Jarartur opened this issue Nov 29, 2024 · 3 comments

Comments

@Jarartur
Copy link

Jarartur commented Nov 29, 2024

First, thank you for this fantastic plugin!

I’ve encountered an issue with importing standalone notes created in Zotero using the "Create Note From Annotations" option (when selecting multiple elements). Specifically:

  • Standalone notes without a parent item cannot be selected for import using the "ZotLit: Import Note" command in Obsidian.
  • However, if the standalone note is attached to a random item, it becomes importable.

It would be helpful to support importing standalone notes directly, even without a parent item.

(Also, great job on how the imported notes correctly link to references—very impressive!)

@Servinjesus1
Copy link

Servinjesus1 commented Jan 9, 2025

@Jarartur What template code do you use to import the attached note? I am seeing the note under the notes field, but when importing, it.notes is an empty list. Some troubleshooting code I can put in my template includes:

<%= JSON.stringify(it.notes) %>
<%- if (it.notes.length) { %>
---

## Notes

<% for (const note of it.notes) { %>
<%= "note" %>
<%= note -%>
<%= note.content.replace(/(#+)/g, "##$1")-%>
<%- } %>
<%- } %>

The stringify returns [], which is apparently not False-like in javascript, hence the need for it.notes.length in the following line, which prevents parsing of the remaining lines.

Yet, in the item browser I definitely have one note in the item so IDK what's going on.
image


Zotlit Version 1.1.9
Obsidian Zotero 1.0.1
Zotero 7.0.9
Obsidian 1.7.7

@Jarartur
Copy link
Author

Jarartur commented Jan 23, 2025

I don't think it uses any template at all tbh. When I import it like that it just creates a note (without any properties) containing all the text that was in the zotero note.

It's created under the zt-import folder without any reference back to zotero.

@Servinjesus1
Copy link

So to confirm what I think you’re saying, you have not customized Zotlit settings involving the templates used to create notes or the save location? Note that Zotlit comes with starting templates, so when you say “I don't think it uses any template at all” I assume you mean it’s using its default configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants