Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tp.file.title creates new Untitled note instead of processing the current one #1516

Open
d0verenny opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@d0verenny
Copy link

d0verenny commented Dec 25, 2024

Plugin information (please complete the following information):

  • OS: Windows 11
  • Templater version: 2.9.1
  • Obsidian version: 1.7.7
  • Templater settings:

Synthax higlighting on Desktop: ON;
Synthax highlighting on mobile: OFF
Automatic jump to cursor: ON
Trigger Templater on new file creation: ON
Regex: OFF.

Template folder location: "TemplateR/"
Template location/hotkeys: TemplateR/general.md

My template:

---
title: <% tp.file.title %>
type: 
created: <% tp.date.now("DD-MM-YYYY, h:mm a") %>
company: 
project: 
author: Maksim Ilinskii
aliases: 
source: 
tags: inbox
---

# [[<% tp.file.title %>]]

Other settings:
Startup templates: None
Script filed folder location: None
User scripts: None

Describe the bug
When using the command Create TemplateR_Template_Location/Template.md (mine is TemplateR\general.md), tp.file.title creates a new Untitled file instead of processing the current Note with a template.

Expected behavior
When using the command Create TemplateR_Template_Location/Template.md, Templater processes the current Note instead of creating a new one.

Screenshots
Template (Source mode)
image
Template (Edit mode with modern properties):
image
An empty file with the title "experiment":
image
The command I use:
image
The file it created after the use of the command Create:
image

Additional context
It used to work fine before. Before that, tp.file.title would process the current note with no problem.

My thoughts were it's either the plugins Filename Heading Sync and Title renamer were messing up with it. I removed them completely. I even reinstalled TemplateR. It didn't help.

I tried to turn of ALL the plugins but Templater -- it didn't help, the problem persisted.

My other suspicion was that I got that GIT plugin LF will be replaced by CRLF the next time git touches it warning.

I tried both to set – git config --local core.autocrlf to both false and true, and commited changes after of each try.

I also tried to normalize in git via powershell in the root directory of the vault.

$ echo "* text=auto" >.gitattributes
$ git add --renormalize .
$ git commit -m "Introduce end-of-line normalization"

Everything to no avail.

I tried to open an old backup of my vault -- and TemplateR works as it should -- processing the current note instead of creating a new, Untitled one.

Also, for some reason, the Console in Obsidian doesn't give any feedback upon using the command.

Using Insert command works normally.

I can provide access to the vault, if needed...

Thanks in advance!

Update: I opened an old version of my Vault to check if it'll work, for some reason it didn't as well... I don't understand what's going on.

@d0verenny d0verenny added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant