Duplicate entries per folder note
I have added the template path to a template that has only this on it, bar a title.
TABLE
FROM -#MOC
WHERE contains(file.folder, this.file.folder)
When I create a folder note it adds two sets of queries per page. As shown in the image.
I can't reproduce it. Do you maybe have something else enabled that also adds a template to it? Or can you reproduce it in a sandbox vault?
I also have this issue. Kind of.
When using the "Settings > General > Key for creating folder note" (in my case "Alt + Click"), it works as expected.
However, when I set up a Hotkey for "Folder notes: Create markdown folder note for current folder of active note" (in my case "⌘ + Enter") and use the Hotkey, the template is duplicated in the created folder note.
Like @n1ck3, I have this bug. Using the "Alt + Click" method works fine, but if I right-click on a folder and select "create markdown folder note", I get the contents of the templates file doubled.
I can confirm the above with 1.7.32 on Obsidian 1.7.4.
If you use the hotkey command (for me Ctrl+Click), it creates fine. But if you use the right-click menu -> Folder Note Commands -> Create markdown note ... it duplicates everything after the Frontmatter fold (if your template has frontmatter in it).
I debugged it in a blank vault with a few plugins I suspected might be conflicting and narrowed it down to Templater. If that is installed, it seems Templater takes over the templates path and things get executed twice.
Disabling Templater, you can't set a file directly in Folder Notes path setting so you have to manually edit the data.json with Obsidian closed, it works fine after that .. until Templater is started again.
The fix seems to be to add a blank Templater command in the Folder Note template (I put it directly below the Frontmatter delimiters).
<%""%>
And it appears to work fine after that.
Will be fixed soon see #187