obsidian-meta-bind-plugin icon indicating copy to clipboard operation
obsidian-meta-bind-plugin copied to clipboard

Meta Bind Button Builder is not runnin JS when button is clicked

Open aleatorica opened this issue 6 months ago • 1 comments

Please fill out these Check-boxes

  • [x] I checked for existing similar issues
  • [x] I checked that the plugin is up to date
  • [x] The issue persists with all other plugins and themes disabled

Plugin Version

1.4.1

This Issue Occurs on

  • [x] Windows
  • [ ] Linux
  • [ ] macOS
  • [ ] Android
  • [ ] iOS

Debug Info

SYSTEM INFO:
	Obsidian version: v1.8.9
	Installer version: v1.6.7
	Operating system: Windows 11 Pro 10.0.26100
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: dark
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 27
	Plugins enabled: 2
		1: JS Engine v0.3.2
		2: Meta Bind v1.4.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the Issue

MetaBind is not executing type: JS buttons using JS Engine scripts.

When clicking a button configured with type: JS and action: TaskMetadataTag.js, nothing happens — no error, no notice, no script execution. Even simple test scripts (e.g., new Notice("Hello")) do not run. Expected behavior is for the button to trigger a script located in .obsidian/Scripts/TaskMetadataTag.js

label: This is a button
icon: ""
style: default
class: ""
cssStyle: ""
backgroundImage: ""
tooltip: ""
id: ""
hidden: false
actions:
  - type: js
    file: Scripts/TaskMetadataTag.js
    args: {}

Steps to Reproduce

Steps to reproduce (what I did):

I confirmed that MetaBind is installed and working properly.

In the MetaBind settings, I made sure “Enable External JS Scripts” is turned on.

I placed a script at the path:
.obsidian/Scripts/TaskMetadataTag.js

I created a MetaBind button in a note that points to this script using type: js.

I clicked the button in both Live Preview and Reading Mode.

What actually happened:

Nothing.

No errors, no notices, no feedback at all.

The script did not run.

Expected Behavior

Expected Behavior (what should happen):

When I click the button, MetaBind should execute the script located at .obsidian/Scripts/TaskMetadataTag.js.

If the script includes something like a new Notice() or any visible output, I should see it immediately.

I expect confirmation that the script was triggered — either visually (notice or result) or through logs/errors if something goes wrong.

aleatorica avatar Apr 18 '25 22:04 aleatorica