Trying to create a daily note with a template being inserted into the note on creation. Whenever I attempt to do so nothing is inserted into the note, and there’s no templater error message to notify if something went wrong. Inserting the template manually using the templater plugin inserts nothing. Inserting the template using the normal template plugin inserts as normal, however the properties tab of the note doesn’t activate properly.
Things I have tried
Checked for updates, there were none.
Refreshed CSS snippets, no difference.
Turned off CSS snippets, same deal.
Disabled and re-enabled Daily Notes plugin, no difference.
Turning on restricted mode, then re-enabling templater by itself, no difference.
Uninstalling and reinstalling templater, no difference.
Turning on restricted mode, turning off CSS snippets, then restarting obsidian, no difference.
Uninstalling and reinstalling Obsidian, no difference.
Tried to replicate the issue in the sandbox, was not able to.
Searched the internet (aka this forum + the reddit), no solution worked.
All settings are adjusted properly, sandbox settings are exact to my main vault, down to the folder names and snippets.
Something of note: The daily notes I created in the past back when the plugin worked fine had some extra whitespace in the beginning of the file name in the explorer, when I try to create new daily notes, this extra whitespace is missing. Also, the whitespace is present in the sandbox daily notes.
Following up, here is my template for the daily note as well as my settings I have for templater and daily notes
date: <%tp.date.now("YYYY-MM-DD")%>T<%tp.date.now("HH:mm")%>
tags:
- daily
cssclasses:
- daily
<% "- " + tp.date.now("dddd", 0, tp.file.title, "YYYYMMDD").toLowerCase() %>
---
# DAILY NOTE
## <% tp.date.now("dddd, MMMM Do, YYYY", 0, tp.file.title, "YYYYMMDD") %>
***
### Journal
#### What I've Done:
- daily activities go here
#### Reflection:
This is where I reflect on my day
#### Was I the best I could be today?
Yes or no question, did I keep myself to the standard I try to live by today?
***
### Tasks
- [ ] Task 1
- [ ] Task 2
- [ ] Task 3
Above is my daily template, it utilizes some CSS snippets to color code the note based on the day. The code does not belong to me, I got it from a youtube video (I would provide the link but the forum doesn’t like that).
The following are screenshots suggested by ariehen, hopefully they provide some further clarification into my issue, it could just be me, I am very new to obsidian…
Your settings look good and I can confirm the daily template, as is, doesn’t output anything. Looking at the template, there are a few issues I see:
It’s missing the opening --- to start the YAML section.
The indent of the second cssclass line is wrong. In a quick test, 0-1 spaces causes the issue of the blank output after running Templater. There should be two spaces there; Live Preview will still show the red error, but it works.
Give this version a try. The <% "---" %> parts are to keep the metadata editor out of the way if you are working in Live preview.