Templater
Templater copied to clipboard
The recent upgrade of this plug-in has broken "Trigger Templater on new file creation"
I don't know programming, I just want to solve the most basic problem, which is: automatically load the template when creating a new note.
I have been using your plug-in for several years without any problems, but after upgrading it two days ago, it stopped working. I didn’t change any settings.
I don't know what you changed, I just want to load the template automatically,
Can you provide more settings? You need to have the following settings to accomplish what you want:
- Template folder location: folder where you will put your templates (in my case, “00 Meta/01 Templates”).
- Trigger Templater on new file creation: on.
- Enable folder templates: on.
- Add new folder template(s).
- Add your folder templates here. The left input is where you’ll set the folder where you want the template to be applied. The right input is for the template that will be applied to new notes in that folder.
Can you also provide what version you were on before and what version you are on now?
I have the same issue.
SYSTEM INFO: Obsidian version: v1.6.3 Installer version: v1.6.3 Operating system: Windows 10 Home 10.0.19045 Login status: not logged in Insider build toggle: off Live preview: off Base theme: dark Community theme: MagicUser v20.4.0 Snippets enabled: 35 Restricted mode: off Plugins installed: 146 Plugins enabled: 59 1: Dictionary v2.22.0 2: Advanced URI v1.40.1 3: Android nomedia v0.1.0 4: Auto Link Title v1.5.4 5: Beautitab v1.6.1 6: Better Export PDF v1.8.0 7: Commander v0.5.1 8: Copy document as HTML v0.7.0 9: Creases v0.7.0 10: Custom Classes v2.6.1 11: Dataview v0.5.66 12: Editing Toolbar v2.4.16 13: Editor Commands Remap v1.0.2 14: Editor Syntax Highlight v0.1.3 15: Enhancing Export v1.10.5 16: Excel v1.3.24 17: Excel to Markdown Table v0.4.0 18: Export Image plugin v2.3.10 19: Google Calendar v1.10.14 20: Homepage v3.8.0 21: Linter v1.24.0 22: Local Backup v0.1.7 23: markdown export v1.0.20 24: Minimal Theme Settings v7.5.0 25: Natural Language Dates v0.6.2 26: Navigate Cursor History v1.1.0 27: Number Headings v1.16.0 28: Omnisearch v1.23.1 29: Paste image rename v1.6.1 30: Set View Mode per Note v1.0.3 31: Show Current File Path v0.5.2 32: Sortable v0.3.1 33: Status Bar Organizer v2.0.2 34: Tasks v7.4.0 35: TinyChart v0.1.1 36: Vault Changelog v0.1.0 37: Quiet Outline v0.3.31 38: Recent Files v1.4.1 39: File Explorer Note Count v1.2.2 40: Vault Statistics v0.1.3 41: Symbols Prettifier v1.1.1 42: Settings Management v1.0.5 43: Quick Explorer v0.2.8 44: Scroll to Top v2.1.4 45: Note Toolbar v1.7.28 46: Admonition v10.3.2 47: Advanced Tables v0.21.0 48: Templater v2.3.3 49: Text Extractor v0.5.2 50: Todo sort v1.0.0 51: Translate v1.4.8 52: Typing Transformer v0.4.0 53: Webpage HTML Export v1.8.01 54: Supercharged Links v0.12.1 55: Style Settings v1.0.8 56: Share my plugin list v0.3.3 57: Colored Tags Wrangler v0.19.3 58: Tag Wrangler v0.6.1 59: CSS Editor v1.2.1
Here are screenshots of my settings:
This is my template:
---<%*
let title = tp.file.title
if (title.startsWith("Untitled") || title.startsWith("Unbenannt")) {
title = await tp.system.prompt("[Folder TEMPLATE Füller] Bitte den neuen Füllernamen eingeben:");
if (title != null) {
await tp.file.rename(title);
tp.file.title = title;
} %>
aliases:
- Notiz
tags:
- Notiz
filename: TEMPLATE
erstellt: Freitag, 03. November 2023, 20:07:37 Uhr
geändert: Dienstag, 11. Juni 2024, 11:18:37 Uhr
Info:
---
```query
tag:Notiz
```
## 1 ErsteÜberschrift
<% tp.file.cursor(0) %>
This is the output of the console:
That error is saying it can't find the template that is specified in your folder template settings for that folder. Maybe you changed the path of your template recently? Can you try removing that folder template and adding it back again?
Another issue I'm seeing is that you're missing a closing }
<%*
let title = tp.file.title
if (title.startsWith("Untitled") || title.startsWith("Unbenannt")) {
title = await tp.system.prompt("[Folder TEMPLATE Füller] Bitte den neuen Füllernamen eingeben:");
if (title != null) {
await tp.file.rename(title);
tp.file.title = title;
} // HERE
} %>
Thank you very much for your answer.
The missing } seems to fix the issue on android mobile. Tomorrow I'll look at Obsidian on Windows 10.
And if fices the issue also on Windows 10. Thank you very much!
Closing due to no response from OP.