Accidentally deleted the default `tags` and `aliases` properties and unable to recreate these

What I’m trying to do

Hi everyone :wave: I accidentally deleted/unassigned the default tags and aliases properties and now have no way to restore or recreate these, so I might permanently not be able to use tags as a property.

Things I have tried

I’ve tried switching to YAML to create a property “tags” and input some test tags like #tag1, #tag2 :arrow_down:

Screenshot 2023-10-03 at 5.35.24 PM

but these are still saved as type Text when switching to the rendered view :arrow_down:

Screenshot 2023-10-03 at 5.35.35 PM

When right-clicking on the property “tags”, I can see the property type Tags but it’s greyed out, so I’m unable to change the type away from Text :arrow_down:

Screenshot 2023-10-03 at 5.46.40 PM

Any suggestions on solving this would be welcomed, thank you!

Tags in YAML should be formatted as :

tags:
  - "#tag1"
  - "#tag2"

If you want to use hashtags (#tag)

… or using this format:

tags:
  - tag1
  - tag2

In YAML, the # symbol denotes a comment hence the need to surround #tag by quotes.
This could also be the reason why your tags key isn’t correctly interpreted/parsed by Properties :thinking: .

In other words, I think that what you wrote for the tags key just doesn’t follow the right syntax.

You could also have used this though :

tags: ["#tag1", "#tag2"]

… or this :

tags: [tag1, tag2]

But the inline array will be re-written as a multiline bulleted list once you’ll modify any value for any key in Properties :blush:

Thank you for the corrections! I’ve tried re-formatting the tags as per your suggestions, but it changed to List type instead of Tags, and the “#tag1” doesn’t exactly work as a tag (doesn’t do anything when clicked) so I’m still stuck at this part :thinking:

Hmm :thinking:

Have you tried to reboot Obsidian ?
(Sometimes it helps :sweat_smile: )

Maybe you could take a look at the types.json file located in the .obsidian folder of your vault and see if the key "tags" is associated with the type "tags" in there … :thinking: .

The 3 “default” Obsidian keys (aliases, cssclasses and tags) should be the 3 top entries within "types" in that file :

{
  "types": {
    "aliases": "aliases",
    "cssclasses": "multitext",
    "tags": "tags",
  
    etc...
  
  }
}    
2 Likes

Wow rebooting actually worked haha, I can see the correct property type for all 3 default keys now! Thank you for your help! :raised_hands:

1 Like

My pleasure :smile: !

Glad to know that the reboot worked :grin: !

1 Like

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