mProjectsCode / mProjectsCode/obsidian-media-db-plugin

"Property cannot be remapped" properties appended to frontmatter

Open
#267 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
491
Forks
52
Avg merge
2h 17m
Merged PRs (30d)
1

Description

  • The Plugin is up to date
  • Obsidian is up to date

Describe the bug
When "Use default front matter" in unticked, and the template used omits the fields id, type, and dataSource (the properties labelled "property cannot be remapped"), these fields are appended to the newly-created entry's frontmatter anyway.

To Reproduce

  1. Untick "Use default front matter" in plugin settings
  2. Create a new Media DB entry using a template that has frontmatter excluding id, type, and dataSource
  3. The entry's frontmatter has those properties added anyway, despite the template omitting them

Expected behavior
When "Use default front matter" ("If disabled, the front matter from the template will be used") is disabled, the template's frontmatter is replicated exactly, without the additions of these extra unwanted fields.

Occurs on

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Plugin version
0.8.0-canary.202060406T152718

Extra context
It seems that "property cannot be remapped" properties have something preventing them from being remapped at all, which also prevents them being remapped to 'remove', which the "Use default front matter" toggle may do behind the scenes. (Just my logical best guess, not sure)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the "Use default front matter" setting through creation of a new Media DB entry from a template. Compare the template's frontmatter with the generated entry and identify where id, type, and dataSource are appended. Done means a template with that setting disabled retains its frontmatter without those extra properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.