srg-kostyrko / obsidian-journal

MIT License
124 stars 8 forks source link

Plugin errors out on unexpected data in frontmatter #60

Closed srg-kostyrko closed 4 months ago

srg-kostyrko commented 4 months ago

Plugin fails if the data in frontmatter is not in correct format For example template with journal section configured as follows

---
journal: Journal
journal-start-date: {{date}}
journal-end-date: {{date}}
journal-section: day
---
srg-kostyrko commented 4 months ago

Fixed in 1.4.0

amglez commented 2 months ago

Hi there templater plugin crashes at keys like "journal-start-date". From my obsidian console:

Templater Error: Template parsing error, aborting. start is not defined

I know nothing about yaml but Should not it be "journal_start_date"? Perhaps it is something totally different, but I would be very grateful if you could look into it.

Thanks

srg-kostyrko commented 2 months ago

First of all - you don't need to add plugin related fields in your template - plugin will do it itself when note created this ticket was more about protection about cases when people still try to do it (and it was breaking plugin functionality)

I also tried to reproduce the issue - and I cant from error is sounds like templater tries to process fields as javascript - that it should not be doing to frontmatter fields can you please show template contents where you do see this issue?