Backlinks Display Path Instead of Alias When Note Names Conflict

When new notes are created that have the same name of another note, and there is a backlink to that first note, the backlink is updated to show the path, which makes it messy.

Obsidian usually updates the backlink to have an alias [[File|Alias]], but it doesn’t in this case.

This also happens when renaming a file to one that exists and is backlinked to.

Steps to reproduce

  1. Create three folders:
    • Folder1
    • Folder2
    • Folder3
  2. Create two notes with the following names and paths:
    • Folder1/Test1
    • Folder2/Test2
  3. In ‘Folder1/Test1’, create a backlink to Test2: [[Test2]]
  4. In Folder3, create a new note called Test2

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

[[Folder2/Test2|Test2]]

Actual result

[[Folder2/Test2]]

Environment

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.7.7
Operating system: Windows 11 Enterprise 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 8
Restricted mode: off
Plugins installed: 12
Plugins enabled: 8
1: Natural Language Dates v0.6.2
2: Recent Files v1.3.3
3: Tag Wrangler v0.5.11
4: Better Word Count v0.10.1
5: Dataview v0.5.66
6: Execute Code v2.0.0
7: Editing Toolbar v2.4.16
8: Novel word count v2.9.0

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.