Templater icon indicating copy to clipboard operation
Templater copied to clipboard

Templater automatically renames a new script.js with the name of the opened note.

Open tiagobrc opened this issue 1 year ago • 3 comments

Plugin information (please complete the following information):

  • OS: macOS Ventura 13.0.1
  • Templater version: 1.16.0
  • Obsidian version: 1.1.9
  • Templater settings: Template folder location: "Templates/", Timeout: "5" (add the templates not working with their associated command)]

Describe the bug Templater renames any new_script.js in the folder Templater/scripts with the name of the opened note at the time.

Expected behavior A new_script.js should not be renamed to the name of the opened note.

Screenshots Screenshot 2023-01-30 at 11 49 15 AM

Screenshot 2023-01-30 at 11 49 59 AM Screenshot 2023-01-30 at 11 50 13 AM Screenshot 2023-01-30 at 11 50 21 AM

tiagobrc avatar Jan 30 '23 16:01 tiagobrc

That's a strange one. Some how the new note title is tied to the /scripts folder in the vault?

Anyways, I've started a new note and I can not reproduce the bug (on Windows). The script works fine tho.

img

welpdx avatar Jan 30 '23 17:01 welpdx

Strange indeed. However, if I create the script outside of the scripts folder and move it there. No name modification happens. So that's how I am dealing with it for now. Just thought this could be a systemic bug and posted it here. But maybe is something local.

tiagobrc avatar Jan 30 '23 18:01 tiagobrc

Strange.

Do you happen to have Folder Template on or a plugin that changes file names?

Yea, it does seem local and not really a bug with Templater. Although I have not tested in on mac yet. If you want, what you can do is just create a new vault with just templater installed. Then try with your user script and see if the same problem come up again.

welpdx avatar Jan 30 '23 18:01 welpdx

Marking as removed due to no response from issue author.

Zachatoo avatar May 08 '24 03:05 Zachatoo