beaussan / update-time-on-edit-obsidian

MIT License
165 stars 15 forks source link

Update Time on edit works on file creation but breaks on re-import of note #82

Open Kingpatzer opened 2 months ago

Kingpatzer commented 2 months ago

When importing from Zoterero into a note using templater with the following frontmatter, and Created At deselected in configuration:


"Year:": '2022' "tags:": "✅, ❌, 🔼, 🔽" "Authors:": "Kuldeep Bhalerao, Arya Kumar, Purvi Pujari" "Category:": literaturenote <% tp.user.parseTags("Status", ["✅","⏳","❌"], "✅, ❌, 🔼, 🔽") %> <% tp.user.parseTags("Importance", ["🔼","▶","🔽"], "✅, ❌, 🔼, 🔽") %> created: <% tp.date.now("yyyy-MM-DD'T'HH:mm") %>

Everything works as expected.

If the same citation is reimported, an error is thrown and the frontmatter is not updated as expected. Log attached:

(also note, there's a misspelling in the error message "frontamtter" rather than "frontmatter") from line 6021

obsidian.md-1721939423108.log

Kingpatzer commented 2 months ago

It is, btw, dependent upon the presence of the templater code. without templater code in the frontmatter, the reimport works