Internal links creating new file

What I’m trying to do

I have an internal link to an obsidian note which should open that note. Others with the same syntax work perfectly. I am creating the link by typing two square brackets and then starting to type the file name, till the correct file shows in the list of suggestions, I click on it, and the link is created, as normal. However, in this case, if I then click on the link it creates a new blank note, in the same folder with almost the same name, just a -1 added to the end of the note.

Things I have tried

I have tried repeating these steps in a different note, and the new link behaves exactly the same, creating a new note instead of opening the intended note. Other internal links created today work exactly as they should.

I also tried creating the link using a simple drag and drop of the file into the note where the link should be. Same problem, clicking on the link creates a new note.

Here is the text of the link that is being automatically created (by either approach), which includes the full path to the note:

[[Z. External documents/spreadsheets/radiocarbon_Glykou_etal_2021_input.xlsx|radiocarbon_Glykou_etal_2021_input.xlsx]]

While the links as created for other files with similar names in the same folder look like this, without the full path:

[[carbon_Glykou_etal_2021_input.xlsx]]
[[strontium_Glykou_etal_2021_input.xlsx]]

(no, these notes are not themselves spreadsheets, they are my notes describing the metadata of spreadsheets, each with am external link to the spreadsheets themselves, they just have the same name as their corresponding spreadsheet).

Does anyone know what is causing this weirdness so I can make it stop? It would be lovely if clicking the link to the note actually opened the note, instead of creating a new, empty note.

I have tried merging the new note with the real note, in hopes that it would update the link, but no, it still just makes a new note.

PS

I am not certain if this counts as a bug report (e.g. something wrong with Obsidian), or a request for help (e.g. it is something I did that causes this). Most of the “help” posts I have read seem to be of the sort “I can’t figure out how to…”, so I have gone with bug report for now. If it is better with the other tag, let me know, and I can change it back.

While doing something else today I stumbled upon a solution to this problem. I added the Advanced URI plugin, and then used my right mouse over the note I want to link, used the Copy Advance URI option and then pasted that code in as an external link, and now it works.

I still don’t understand what was causing that issue, nor how to prevent it in the future, so I will leave this open on the off chance that anyone else can explain it, but if anyone else ever has this problem and stumbles on this post, at least I already have one work-around.

This doesn’t look like a link pointing to a markdown note titled radiocarbon_Glykou_etal_2021_input.xlsx (where the .md extension would be implied) but a link to an .xlsx file titled radiocarbon_Glykou_etal_2021_input (stored in Z. External documents > spreadsheets) :thinking:

I can only guess that there could be some mix up going on between both files (the .md note and the .xlsx file) as they seem to be both located in the same folder and have the “same” name…
(If I understood correctly :innocent: )

I didn’t have a .xlsx file on hand so I’ve tested with a .json one which I stored in one of the folder of the sandbox vault…

When adding a link to that .json file in a note I used this:

[[Formatting/test.json]]

… which looks similar to your link (minus the alias)

Now, wanting to create a markdown note bearing the same full name as the file (file title + extension), I instead used:

[[Formatting/test.json.md]]

Note the addition of the .md after the .json
Clicking on it created a .md note titled test.json in the folder Formatting :blush:

Where it gets interesting (imho), is when I try to add the link of the test.json markdown note to another note as the suggester/dropdown, appearing when typing [[ in the note doesn’t differentiate between the .json file and the .md note: Both appear without a way to distinguish one from the other :blush:

Trying to add one or the other from the suggester/dropdown to the note return a link to the .json file in each case but written slightly differently :blush:

If I try to add a link pointing to the test.json markdown note by dragging and dropping it into a note from the file explorer, it also points to .json file (each time) :blush:

I don’t know if this would be considered as a bug or something else :woman_shrugging: :sweat_smile: … but when I create a .md note about a non-markdown file I have in my vault, I never add the extension of said file to the title of the corresponding note :blush:
So I guess you could need/try to remove the .xlsx from the titles of the corresponding markdown notes :woman_shrugging:

The other possibility, at it seemed to work here would be to add the .md extension in the link meant to direct Obsidian to the markdown note and not the file, I guess (once more) :innocent:

[[Z. External documents/spreadsheets/radiocarbon_Glykou_etal_2021_input.xlsx.md|radiocarbon_Glykou_etal_2021_input.xlsx]]
1 Like

Oh thank you! Your reply helped me to figure out the problem. The link should be pointing to an obsidian note which shares the name of an excel file, including the .xlsx ending.

Why this one, and only this one was behaving strangely, when all of the other notes named for other excel files behaved normally when I linked to them was very annoying and frustrating. Today, when I finally saw your reply I finally understood the cause of my problem. (I somehow missed seeing the notification when your reply was new, and haven’t opened the forum in a while as everything else has been going smoothly, and the work-around of “copy advanced URI” and create an external link pointing to file worked.)

Your message about how my link looks like a link to an actual excel file got me to open the folder for my vault in my file browser, and, yes, there was a copy of that spreadsheet in there. Somewhere along the way I must have accidentally dragged it into Obsidian without holding the cntrl button to make a link, and the file duplicated into the folder instead, and I didn’t notice, since whenever it happened would have been well after the day I learned the difference between the cntrl-drag-and-drop and a plain drag-and-drop of files in obsidian, and had long since cleaned out all of the accidental copies of other files I had created in my Obsidian vault folder.

I think I can leave the file extensions as part of the file names in obsidian without problems. It is helpful to my workflow. But now I know that if one tries to link to an Obsidian file that shares the same file name as an external document and it instead creates a new, blank, Obsidian note with that name it means that you have accidentally copied the external file into your Obsidian vault, and ought to go clean that up. Hopefully having this written out explicitly here for posterity will help anyone else who runs into the same problem.

(In case anyone cares, the reason I have notes that share the name of a non-Obsidian file is: I have a folder called “external documents” in which I have a note for every non-obsidian file I use for work, with properties to show when it was created, what project it is for, the file location path, what file type it is, and any other metadata that might be useful some day. The actual notes part of the obsidian document includes a working clickable link to the file itself, a file description, plus or minus links to (or back links from) daily notes, project cards, related files etc, and details about things like what cryptic column names mean, and any other information my future self might need to understand the file and/or its contents.)

1 Like

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