quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[BUG] Modifications to macro does not update its respective quick entry

Open alwun opened this issue 2 years ago • 2 comments

Describe the bug Any macro that is modified after the quick entry is enabled does not automatically update itself.

To Reproduce Steps to reproduce the behavior:

  1. Create a new macro and enable quick entry for the macro image image

  2. Modify the macro image

  3. Run macro from command palette image

  4. The macro does not update itself, displaying error image

Expected behavior The macro's quick entry should automatically update when the macro is modified

Additional context The only way to update the macro is to disable the quick entry option and re-enable it after changes are made.

alwun avatar Sep 28 '23 22:09 alwun

I'm having the same issue, and have also seen other users run into this on the Obsidian discord.

FeralFlora avatar Nov 20 '23 10:11 FeralFlora

I found out some more about this. So, there's some migration that is supposed to occur so the macro is referred to by an ID, rather than embedding a copy of the macro into the choice. There seems to be an issue with this migration process, which causes this bug.

At first, I thought there might be some issue with the macro-ids not matching, but I confirmed that this is not the case in data.json.

I found the following workaround, which seems to solve the issue:

  1. Open the QuickAdd plugin folder, and open the data.json file.
  2. Find "migrations" Change this setting to false:
"migrations": {
    "migrateToMacroIDFromEmbeddedMacro": true, // set this to false

I don't know what the potential ramifications of this are, but hopefully @chhoumann can tell us more.

FeralFlora avatar Nov 21 '23 21:11 FeralFlora