Links not updating

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.

Thanks!

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.

But happy to try and figure it out:

Have you tried the troubleshooting steps?

Can you share your “Show debug info”?

Hi Rigmarole,

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!)

No need for the developer console yet. Although you might see some errors there.

What I meant is for debug info:

  • In Obsidian directly, Ctrl-P or the button to run Obsidian commands
  • type “Show Debug Info”
  • Paste the results here

It shows your Obsidian version, OS, plugins, etc. All the info we need to understand what might be going on.

Got it. below.

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.6.7
Operating system: Windows 11 Enterprise 10.0.22631
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: Everforest v0.0.0
Snippets enabled: 2
Restricted mode: off
Plugins installed: 35
Plugins enabled: 27
1: Things Link v1.1.2
2: Tasks v7.10.2
3: Templater v2.7.3
4: Calendar v1.5.10
5: Dataview v0.5.67
6: Periodic Notes v0.0.17
7: Kanban v2.0.51
8: Natural Language Dates v0.6.2
9: Readwise Official v2.1.4
10: QuickAdd v1.11.1
11: Projects v1.17.4
12: JSON/CSV Importer v0.37.0
13: Full Calendar v0.10.7
14: Excalidraw v2.5.1
15: ExcaliBrain v0.2.15
16: DB Folder v3.5.1
17: CardBoard v0.7.9
18: Advanced Tables v0.22.0
19: Day Planner v0.24.0
20: Note Refactor v1.8.2
21: Zotero Integration v3.2.1
22: Style Settings v1.0.9
23: Citations v0.4.5
24: Book Search v0.7.4
25: Multi-Column Markdown v0.9.1
26: PDF++ v0.40.11
27: Supercharged Links v0.12.1

Thanks

First, I forgot to suggest some setting to check (although it’s weird that it recently changed behaviour):

  1. Is “Automatically update internal links” turned on?
  2. What is your “New link format” set to?

Next I would try, if you haven’t:

  1. Update any community plugins that need it. That doesn’t happen automatically. Maybe one is out of date and causing issues.
  2. If that fixes it, Try to turn off community plugins and enable them in batches to try to narrow down if one is causing the problem.

Ok. Here we go.

  1. All plugins are up to date.

  2. My settings look similar to yours:

  3. Further clarification on how the files are moved:

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’m not sure…

I think you need to await the tp.file.move() :blush:
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 :blush:

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 :blush: :

Execution command:

<%* await tp.file.move("Test/" + tp.file.title) -%>

or

<% await tp.file.move("Test/" + tp.file.title) %>

I might not have completely follow the steps you take to create the note and move them though :innocent: .
This is just what I saw from some very quick tests in the Sandbox vault with Templater being the only plugin installed :blush:

Thanks @Pch! I figured there was a simple solution.

I’ve modified two of my templates to include the “await” instruction and these templates now function as they used to.

I’m not sure what changed to make the link update not work, but this addition to the templater code seems to have resolved my issue.

Thanks all for your help!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.