Templater not parsing file names nor storing files in assigned folders

This is an example of a Templater template.

  let title = tp.file.title
  if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title");
    await tp.file.rename(title);
 tR += "---"

Title: <% tp.file.title %>

Date: [[<% tp.date.now("YYYY-MM-DD") %>]]

I have used this for months without problems. Obsidian crashed the yesterday, so I decided to delete the app and reinstall it.

All my notes are fine but some of the settings needed to be redone, such as hotkeys and file preferences.

When I use the sample template above:

  1. I am prompted for the file title twice
  2. Templater inserts the right date in the file
  3. Templater does not insert either of the titles from the prompts in point (1) above; it just names the file Untitled

Have uninstalled Templater and tried the same code in a test vault. Can’t get it to work.

I also have Folder Templates assigned to different templates. None of those templates work properly, showing the same errors as above but also not putting the new notes in the folders they should appear in.

Thanks in advance for any advice.

Solved – I was loading templates from Templater when I should have been using QuickAdd instead.

Consider me happy. :dancer:

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