question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug report: Dataview Picking Up Backslash \ in Inline Field

See original GitHub issue

What happened?

While using inline fields from dataview in a table with an alias, it seems the escape character \ is being picked up and dataview seemed to be unable to find a note because of the backslash applied to it:

| Table | Test |
|---|---|
| Field | (Field:: [[DV File 1\|Inline Syntax Formatting]])

Field:: [[DV File 2\|Inline Syntax]]

Field:: [[DV File 2|Not Escaped File]]

Obsidian_OkjpqwcJgE

The file on the right is linked to the file on the left, but doesn’t appear in the dataview list because of the escaped link. Obsidian_nZMFLodPOl

Figured out it was a dataview issue with the dataview query below. Using this.file.link doesn’t find the note since it’s not DV File 1, the inline field reads the link as DV File 1\ which doesn’t exist.


Issue discovered initially when using breadcrumbs: https://github.com/SkepticMystic/breadcrumbs/issues/386

DQL

TABLE WITHOUT ID Field
FROM ""
WHERE contains(Field, this.file.link)

JS

No response

Dataview Version

0.5.9

Obsidian Version

0.14.7

OS

Windows

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
blacksmithgucommented, Apr 27, 2022

Bad link parser implementation; thanks for flagging.

0reactions
SlRvbcommented, Jun 5, 2022

So I’m on dataview 0.5.26 which has made some stuff go a little more haywire 😵‍💫 (visible in the genre column of the query)

My query is just this, basically look for songs where the album field links back to the current note:

```dataview
TABLE WITHOUT ID 
	link(file.link, Alias) AS Song, 
	N AS "\#", 
	Genre,
	Year
FROM "30 Projects/Music/Songs"
WHERE contains(Album, this.file.link)
SORT N asc
```

Which works for the file Meridian Ambit since the album link doesn’t have an escaped alias, but the others don’t show up as they’re escaped and are thus read as SL-M-A - Worlds|Worlds which is a file that doesn’t exist so there’s no file.link or file.path for the query to grab even though the file SL-M-A - Worlds exists and is linked. The escaped link isn’t parsed to read the part before \| to search for that it seems so it breaks my query.

Obsidian_cGtEmVfCKz

Removing the escape [[SL-M-A - Worlds|Worlds]] does work, but since there’s a pipe, it breaks the link visually in the table 🥴

Obsidian_lOLlecD8uF

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inline Dataview fields are not rendered correctly if the ... - GitHub
I was about to report something similar with inline fields containing tags. So I am just going to drop it here. image. Not...
Read more >
Known Issues for Oracle Transactional Business Intelligence
Issue Delivering Publisher Reports to a Remote Directory​​ This is likely because the remote directory path name includes the backslash character (\). To...
Read more >
Known Bug List - Claris Community - FileMaker Pro
When inserting a long string of text into a text field from an ODBC data source on a FileMaker layout, the entire string...
Read more >
What are some of your current frustrations with Obsidian?
I was considering investing time to add metadata to old notes to utilize data view. I'll pause for now.
Read more >
Using Painless in Kibana scripted fields | Elastic Blog
When you go to define a scripted field in Kibana, you'll be given a choice of scripting language, allowing you to pick from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found