Hello, I’m not a developer, just a user of Obsidian. In the most recent update, the updating of links to created notes has failed.
Example:
From my daily note, I create a note titled [[123]]
In that note [[123]], I apply a template, where the note is moved to a new folder within my vault.
If I go back to my daily note and click on the [[123]] link, it creates a NEW NOTE named [[123]].
As I’m not a developer in any way, I just figured I was doing something wrong, but I’ve not had this problem until the most recent update. Is this a known issue?
There are similar reports in the forum from 2022 timeframe, but not with any clear resolution that I could see.
Moved to help for now. Bug reports need to follow the template, and be tested in the Sandbox vault or easily reproducible. And not involve community plugins.
Can you help me understand what aspect or information from the development console would be useful?
Basically, the way I’ve used obsidian for many months isn’t working now and I have to manually update every link after the file is created and moved to a folder through the application of a template. (Meaning, I apply a template and it moves the note to a folder. Up to now, this new file path would be reflected in the internal links automatically, now it doesn’t update)
Thanks for the guidance in what information would be valuable here. (Also thanks for putting the request in the best spot for the greater obsidian team!)
In my typical workflow, I use the daily note. From this note, I will create new notes throughout my work day. In the daily note, I’ll create a file, for example “[[123]]”. Then enter the file.
I have a number of templates I regularly use. When I apply the template (via templater), I include a command to move the file to the appropriate folder. (this streamlines my dataview queries) An example would be:
<%*
tp.file.move(“People/” + tp.file.title)
-%>
Thus, the “title” of the note remains the same, but the file path changes. for instance, I create “123.md” in the default folder. Then, apply my template, and the filepath changes to “People/123.md”
In the last week or two, when I apply the template, the file will move per usual. However, when I attempt to access the original link from the daily note, the link to [[123]] is not updated to [[People/123]].
I’m presuming this is something silly that I just don’t understand. Thanks again for helping me to figure this out!
If you have “Shortest when possible” then this absolutely makes sense! If the note name is unique, then it will not put “People” in front unless necessary. (ie. if another note named 123 already exists.) If it’s unique, Obsidian should still be able to find it by short-name.
But if you click the link and it makes a new note, then that is something wrong. Unless the note isn’t actually unique.
I think you need to await the tp.file.move() …
If you look at the examples on Templater’s documentation here, they’re all use await …
I ran some quick tests last night and got some kind of duplicates when using tp.file.move() within an execution command (<%* ... %>) without the await
When I say duplicates, I mean that when I trigger the following template:
<%* tp.file.move("Test/" + tp.file.title) -%>
Templater moves the note where it should but it also creates a brand new note at the root of the vault bearing the same name … and the link I used to create the note to move which is still sitting in another note, now points to that new “duplicate” instead of the note that was just moved…
But this doesn’t seem to happen if you don’t use an execution command and don’t await :
<% tp.file.move("Test/" + tp.file.title) %>
Or if one follows the documentation and await the tp.file.move() in any cases (so using an execution or not)… which is what I would do :
I might not have completely follow the steps you take to create the note and move them though .
This is just what I saw from some very quick tests in the Sandbox vault with Templater being the only plugin installed