You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every so often Templater will completely overwrite the contents of a file. It has been going on since at least September but I only just now was able to prove it.
It just happened to me today and I thought I was losing my mind. Luckily I had Obsidian Git installed and was able to recover the file.
It overwrote the file with my default template. It can happen to old files that had been safe for months or new files that were created that day.
Expected behavior
Files should not be reset/cleared/overwritten/blanked unless explicitly told to. (using synonyms to make finding this issue easier)
Screenshots
This is the one that happened today:
This one happened back in September and is a perfect example because I don't ever update UUIDs:
I've tracked down around a dozen of notes that this has happened to.
Additional context
The oldest instances I've seen are from around September 2nd, 2023. By looking at the history of .obsidian/plugins/templater-obsidian/manifest.json I can see the Templater version I had at the time was1.16.0. It is still happening with version 2.0.0.
I don't see a way to track the exact version of Obsidian I was using then, but as I stay reasonably up to date and was not using pre-release versions I'm pretty certain it was Obsidian 1.4.0.
What's really odd is that it must be happening in the background. eg not when I'm looking at the file. So perhaps in an inactive tab?
I did not create or open any of those files at the same time on my phone. I can't rule out that it doesn't have something to do with Obsidian Sync since I did open Obsidian on my phone around then to look at a different note. Like maybe Sync recreated it and it got caught in a file creation hook? If so it may be related to #1082?
Hmm. I've been trying to figure out how Sync might be involved.
The fact that it seems to have started months after I started using Sync seems to make it unlikely that it is just Sync itself, something probably happened in late August that created the issue.
The problem with #1096 is that these aren't new files some of them had been in the vault for months. Looking at my git history there's no correlation between when a file is created, moved, or renamed and when its contents are clobbered.
So unless Sync is just randomly re-creating files during a transfer (maybe because of like an atomic file update??) I'm struggling to figure out how it would create an empty file that is then populated by Templater on a remove machine and subsequently the newer file then transfers back. Particularity for files that aren't actively open on a remote machine. No amount of templates disabling Sync would fix that because a template shouldn't be running at all, right?
Plus that issue popped up 6 months before this one did, so I'm not sure. There could still be related under the hood, but I suspect they're different.
In the meantime I'll disable Templater on my phone and secondary devices and see if it occurs again.
Also, for posterity, even though I'm using Obsidian Git I am only using it locally, not for syncing. So it's not creating any conflicts with Obsidian Sync or anything.
Plugin information:
(settings at end)
Describe the bug
Every so often Templater will completely overwrite the contents of a file. It has been going on since at least September but I only just now was able to prove it.
It just happened to me today and I thought I was losing my mind. Luckily I had Obsidian Git installed and was able to recover the file.
It overwrote the file with my default template. It can happen to old files that had been safe for months or new files that were created that day.
Expected behavior
Files should not be reset/cleared/overwritten/blanked unless explicitly told to. (using synonyms to make finding this issue easier)
Screenshots
This is the one that happened today:
This one happened back in September and is a perfect example because I don't ever update UUIDs:
I've tracked down around a dozen of notes that this has happened to.
Additional context
The oldest instances I've seen are from around September 2nd, 2023. By looking at the history of
.obsidian/plugins/templater-obsidian/manifest.json
I can see the Templater version I had at the time was1.16.0
. It is still happening with version2.0.0
.I don't see a way to track the exact version of Obsidian I was using then, but as I stay reasonably up to date and was not using pre-release versions I'm pretty certain it was Obsidian
1.4.0
.What's really odd is that it must be happening in the background. eg not when I'm looking at the file. So perhaps in an inactive tab?
I did not create or open any of those files at the same time on my phone. I can't rule out that it doesn't have something to do with Obsidian Sync since I did open Obsidian on my phone around then to look at a different note. Like maybe Sync recreated it and it got caught in a file creation hook? If so it may be related to #1082?
Templater settings 2023-09-02
Community Plugins Installed
Templater settings 2023-12-17
The text was updated successfully, but these errors were encountered: