Templater stopped working today - do you have this issue?

Things I have tried

All of a sudden my Templater Templates are not working today. They worked yesterday, I use Daily Note every day but when I ran it today the code between <% and %> remains unprocessed and inserted as code. This is consistent across two separate apple laptops.
I’ve tried restarting Obsidian, removing Templater and installing it again but nothing helped.
What could be the reason?

What I’m trying to do

1 Like

I don’t have this issue (on Linux).

You could check if Templater is still enabled (not just installed), and if the Templater setting “Trigger Templater on new file creation” is toggled on - it’s disabled by default after a fresh install; a note created with a template by the “Daily notes” plugin would remain unprocessed by Templater in this default case.

If you post the template at might help you locate the error. It’s normally an error which causes the template to not be replaced (if Templater is enabled).

If you have user templates, there might be a code error in one of those. This will prevent Templater from starting up in the first place, and will make it unable to execute any templates.

If you check your console you might see some helpful error messages (Ctrl + Cmd + i or something like that for Mac).

Here is the code from the template. The challenge is that it worked multiple times, and I have not modified anything since the last run. It’s supposed to prompt for an ‘index’ and then rename the current note to “Newsletter index.1” where index is the response taken on the prompt

<%*
// create new filename
let newsletter_index = await tp.system.prompt(“Current index:”);
note_name = “Newsletter “+newsletter_index+”.1”;
//rename note
await tp.file.rename(note_name) %>

tags: what/source/newsletter🗞

Except of the wrong quotation marks ( and vs. "), the template is fine. Works on my installation as expected.

With the quotation marks as posted by you, there is a silent failure: in the Developer Console (Ctrl+Shift+I on my installation) appears:
Templater Error: Template parsing error, aborting. Template syntax error: Invalid or unexpected token

Most likely he’s got the right quotes, but just the wrong formatting.

In a forum post it’s best to include four backticks on the line before and after your markdown (or codr blocks or queries), add it then renders beautifully and quotes are not converted by the forum software.

And you’re sure that you don’t have any files with the same name elsewhere in your vault?

Do you have any user templates? Not your Newsletter template, but templates in your user scripts folder:

If you have user templates, there might be a code error in one of those. This will prevent Templater from starting up in the first place, and will make it unable to execute any templates, even ones that have never been changed.

If you check your console you might see some helpful error messages (Ctrl + Cmd + i or something like that for Mac).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.