In .base files, local URIs in formulas do not open

Steps to reproduce

In the sandbox

  • Create a new note, and add a property whose value is a local URI, such as:
---
myLink: file:///C:%5CUsers
---
  • Create a new base file, click Properties > AddFormula, and enter the formula myLink (or even link(myLink)).
  • In the base column, click that link.

Did you follow the troubleshooting guide?

Y

Expected result

The link opens.

Actual result

The link does not open.

Environment

SYSTEM INFO:
Obsidian version: v1.10.0
Installer version: v1.9.14
Operating system: Windows 11 Pro for Workstations 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information

Console error:

index.html:1
Not allowed to load local resource: file:///C:/%5CUsers

Works as expected in:

  • embedded bases
  • directly displayed properties (i.e., not in a formula) even in the .base file
2 Likes

Hi.

Know this doesn‘t help you, but both of your ideas work on macOS: the Users folder opens from either base below.

The C:%5C part is needed on Windows?

Do you know why the console shows an extra forward slash after C:?

file:///C:%5CUsers

file:///C:/%5CUsers

---
myLink: file:///Users
---

```base
formulas:
  myLink: myLink
views:
  - type: table
    name: Table
    order:
      - file.name
      - formula.myLink

```


```base
formulas:
  myLink: link(myLink)
views:
  - type: table
    name: Table
    order:
      - file.name
      - formula.myLink

```

:red_question_mark: Stupid additional question, but does file:///C:%5CUsers work when in the body of a note?

No, it’s a good question:

:check_mark: It works in the body.

:check_mark: It works in the note’s Properties.

:check_mark: It works when displaying the property as a column in a base.

:cross_mark: It doesn’t work from formulas in the .base file.

:check_mark: It works from formulas in embedded contexts: both base code blocks and ! base embeds.

The the bug report is about the inconsistency is in those last two.


(edits to simplify my list and because I misunderstood this part:)

Nope, don’t know why there’s another slash.

1 Like

thanks. I can confirm this corner case is not working.

1 Like