Metadata Menu mapWithTag not working?

What I’m trying to do

I’ve followed several tutorials that organize documents using tags. For example, I followed " Habit tracking vault build from SCRATCH" by Danny Hatcher. In his tutorial you setup a fileClass with mapWithTag:true, but it never works.

Also, I’ve tried implementing a workout tracker. However, when I try to add a workout, the list is blank despite having added template workouts. When I looked into the JS code, it seems to be an issue finding tags again!

if (tags.includes("#workout") && id == null) {
            workouts.push(file);
        }

It seems like any lesson I follow that makes use of frontmatter tags fails to work as expected.

Things I have tried

I’ve tried changing the format of the frontmatter tag using dashes, brackets and hashtags, but none of these formats work. The tags seem to be formatted correctly when viewed in reading or editing mode. The fact that I’ve had the same issue with two separate tutorials makes me think my Obsidian settings may be mess up but I don’t know where to start.

1 Like

I’d take a step back and start with the basics.

  • Review: Tags - Obsidian Help
  • Open the Sandbox vault (F1 / Help > Sandbox vault → Open).
  • Add a few random inline #tags and a few tags in the Properties view.
  • Do a search for one. Do a search for a few: tag:#gamma tag:#alpha

In Source mode my Untitled 1 note looks like this:

Have a look at the Tags tab:

  • Now do the same thing in your own vault.

If all looks good there as well you can move on to some Dataview queries (try a few different ones querying inline and YAML tags):

```dataview
LIST  
WHERE contains(file.tags, "gamma") 
```


If all that looks good, you can move on to trying the tutorials again and more complex queries. If not, try reinstalling Dataview or some of the other troubleshooting steps.

1 Like

Thank you for the quick reply. All these normal functions of tags are working correctly for me. However, while using the metaData menu plugin, the mapWithTag functionality doesn’t seem to work at all. Files that are tagged Daily do not inherit the fileClass using that tag. It only works if I explicitly define the fileClass in the Template. I thought this might be an issue specifically with this popular plugin but I seem to be having issues with other solutions that depend on tags.

This doesn’t work:
image

But this does (tags don’t seem to matter):
image

This is why I’m trying to inquire whether tags are malfuntioning.

Not a big time user of said plugin and I don’t want to go into a high-blown litany but I’ve seen people complain that the plugin doesn’t function even after restarting Obsidian. Secondly, the latest update seems to break something for me, so I rolled back to the version before.
That’s all I’m going to say.

I’ve renamed the thread to more clearly convey the issue (was “My vault can’t seem to find any tags?”).

1 Like

My guy I was also following the habit tracker by Danny and ran into the same wall as you did.

I noticed that if you map with tag using metadata menu and dont add any tagNames into the fileClass, the mapping will look for the tittle of the fileClass (In your case, Daily) and map those files with the same tag (Daily). For some reason that doesn’t work now.

So I tried adding a tagName to the fileClass (In my case, D).
Something like this:

If you then add the tag D to your Daily template, it should work.

Hope this helps, cheers.

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