Skip to content

button action "update Metadata" cannot find function getMetadata #371

@Yurhmz

Description

@Yurhmz

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.1.2

Describe the Issue

using the update Metadata button Action example in the Example vault, I get an error "getMetadata is not defined" in the console.

here is the full report form console :

plugin:obsidian-meta-bind-plugin:51 meta-bind | ButtonMDRC >> error while running action ReferenceError: getMetadata is not defined
    at eval (eval at runUpdateMetadataAction (plugin:obsidian-meta-bind-plugin:1:1), <anonymous>:3:1)
    at Vh.updateMetadata (plugin:obsidian-meta-bind-plugin:111:18106)
    at _p.runUpdateMetadataAction (plugin:obsidian-meta-bind-plugin:51:8971)
    at _p.runAction (plugin:obsidian-meta-bind-plugin:51:7071)
    at _p.runButtonAction (plugin:obsidian-meta-bind-plugin:51:5269)
    at onClick (plugin:obsidian-meta-bind-plugin:57:14656)
    at f (plugin:obsidian-meta-bind-plugin:57:13305)
    at HTMLButtonElement.p (plugin:obsidian-meta-bind-plugin:57:13406)
runButtonAction @ plugin:obsidian-meta-bind-plugin:51
await in runButtonAction (async)
onClick @ plugin:obsidian-meta-bind-plugin:57
f @ plugin:obsidian-meta-bind-plugin:57
p @ plugin:obsidian-meta-bind-plugin:57

Steps to Reproduce

  1. copy the code from the Example vault from line 208 to 263
  2. paste in an obsidian note
  3. click the buttons newly created
  4. note that the buttons "+1" "reset" and "-1" work as expected
  5. note that the button "add count to count2" returns an error "getMetadata is not defined" in the console

Expected Behavior

clicking on "add count to count2" should use the "getMetadata" function and allow for calculation with multiple variables in the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions