mProjectsCode / obsidian-meta-bind-plugin

A plugin for Obsidian to make your notes interactive with inline input fields, metadata displays, and buttons.
https://www.moritzjung.dev/obsidian-meta-bind-plugin-docs/
GNU General Public License v3.0
543 stars 44 forks source link

templaterCreateNote dont accept templateer excecution time resolution (<%+) #365

Closed ElCuboNegro closed 5 months ago

ElCuboNegro commented 5 months ago

Please fill out these Check-boxes

This Issue Occurs on

Plugin Version

1.1.2

Describe the Issue

templaterCreateNote dont accept templater excecution time resolution (<%+)

Steps to Reproduce

Just try a <%+ command inside filename

  label: New Meeting Note
  hidden: false
  class: ""
  tooltip: ""
  id: ""
  style: primary
  actions:
    - type:

    - type: templaterCreateNote
      templateFile: "Extras/Templates/Meeting.md"
      folderPath: "Meetings"
      fileName: "<%+ await tp.file.title %>/<%+ await tp.date.now('YYYY-MM-DD') %>"
      openNote: true

Expected Behavior

it creates the given file. however it says

[META_BIND_ERROR]

plugin:obsidian-meta-bind-plugin:57 Error: [MB_BUTTON] "The validation for the button config failed." caused by "Your button syntax seems to be invalid. Check that your button config follows what is described in the docs." at Ih.validateConfig (plugin:obsidian-meta-bind-plugin:111:64) at Ih.fromString (plugin:obsidian-meta-bind-plugin:110:62408) at Vh.createButtonMountable (plugin:obsidian-meta-bind-plugin:111:16115) at eval (plugin:obsidian-meta-bind-plugin:133:20766) at t.initDOM (app.js:1:1576051) at t.toDOM (app.js:1:1159760) at t.sync (app.js:1:331365) at e.sync (app.js:1:312962) at app.js:1:354292 at e.ignore (app.js:1:434910) at t.updateInner (app.js:1:354074) at t.update (app.js:1:353829) at e.update (app.js:1:443658) at e.dispatchTransactions (app.js:1:440219) at e.dispatch (app.js:1:442207) at r (app.js:1:1595415) at run (app.js:1:1595638) at d (app.js:1:459459) at Jo (app.js:1:459582) at Object.keydown (app.js:1:457184) at app.js:1:375555 at e.runHandlers (app.js:1:373611) at e.handleEvent (app.js:1:373373)

ElCuboNegro commented 5 months ago

I'm talking about this type of commands.

https://silentvoid13.github.io/Templater/commands/dynamic-command.html

mProjectsCode commented 5 months ago

The error you are seeing has nothing to do with what you are describing. The error states that your YAML is malformed, consider removing line 7 with the empty - type:.