Skip to content

[BUG] Templater commands not executing with "Insert after" selected or "Capture to active file" deselected #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jelleigh opened this issue Apr 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jelleigh
Copy link

Describe the bug

I have the current versions of QuickAdd (1.13.2) and Templater (2.11.1) installed. I had not updated plugins for several weeks, and this first occurred when I updated plugins yesterday.

I utilize the following Capture command to create tasks:

{{VALUE:Task Name}} {{TEMPLATE:Templates/Tasks Tag.md}} {{VDATE: Scheduled Date,:hourglass_flowing_sand:YYYY-MM-DD}} {{VDATE:Due Date, :date: YYYY-MM-DD}} {{TEMPLATE:Templates/Tasks Priority.md}}

  • Templates/Tasks Tag.md contains the following text:
    <% tp.system.suggester([‘#quick’,‘#medium’,‘#long’],[‘#quick’,‘#medium’,‘#long’],true,“Tag”) %>

  • Templates/Tasks Priority.md contains the following text:
    <% tp.system.suggester([‘:small_red_triangle:’,‘:arrow_double_up:’,‘:arrow_up_small:’,’ ‘,‘:arrow_double_down:’],[‘:small_red_triangle:’,‘:arrow_double_up:’,‘:arrow_up_small:’,’ ',‘:arrow_double_down:’],true,“Priority”) %>

The templater scripts are not executed in the following circumstances:

  • When "Capture to active file" is deselected and a folder or file is defined, and "Insert after" is deselected

  • When "Capture to active file" is selected and "Insert after" is selected

However, when "Capture to active file" is selected and "Insert after" is deselected, the Capture command executes correctly:

I have tested this with other templater scripts and files, and have observe the same error. I have not tested on the mobile app.

To Reproduce
Steps to reproduce the behavior:

  1. Create Capture command in QuickAdd that references a template with a templater script
  2. Deselect "Capture to active file" and deselect "Insert after"
  3. Run Capture command
  4. See error
  5. Select "Capture to active file" and select "Insert after"
  6. Define line to insert after
  7. Run Capture command
  8. See error

Image

Expected behavior

When when "Capture to active file" is selected and "Insert after" is deselected, the Capture command executes correctly. The Capture command should execute correctly regardless of whether "Capture to active file" or "Insert after" are utilized.

Image

Desktop:

  • OS: Windows 11 Enterprise, 24H2
  • Browser: Chrome
  • Obsidian version: v1.8.10

Smartphone:

  • n/a

Additional context
none

@jelleigh jelleigh added the bug Something isn't working label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant