Links in frontmatter don't show as linked mentions in Backlinks/Dataview plugins

Steps to reproduce

  1. Create file1 and file2 notes.
  2. In file1 put link reference to the other file like this: [[file2]]. Go to file2 and make sure that the backlink is being seen in the backlink sidebar (the official backlinks plugin should be turned on).
  3. In file2's frontmatter make a link reference to file1 by adding the following to the very start of the file:
---
type: "[[file1]]"
---
  1. Go to the Preview mode to make sure that the link works properly. (might need to tweak some frontmatter options)
  2. BUG: Go to file1 and see that the “Linked mentions” group in the Backlinks plugin’s sidebar is empty.

Expected result

The link should be seen in the “Linked mentions”.

Actual result

  • The reference is not being seen in the Backlinks plugin’s sidebar.
  • Dataview plugin doesn’t see the backlinks either.

Environment

  • Operating system: Linux Mint 20.2 Cinnamon
  • Obsidian version: 0.12.15

I just realized that if you link a note in the frontmatter without having created it previously, it does not appear in the quick switcher.