Skip to content
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

Tasks does no longer initialise properly, for any Queries in Callouts in Live Preview, when already opened at start-up #3366

Closed
4 of 8 tasks
uselpa opened this issue Mar 3, 2025 · 17 comments · Fixed by #3368
Labels
display: live preview Issues referring to Obsidian's Live Preview mode priority: high A high priority/important request scope: callouts Issues with tasks or searches in Obsidian Callouts type: bug Something isn't working

Comments

@uselpa
Copy link

uselpa commented Mar 3, 2025

⚠️ Check issue is valid.

⚠️ Check that this issue hasn't been reported before.

Steps to reproduce

After updating to 7.18.0, callouts with imbedded task queries do no longer show properly when Obsidian is restarted - the source of the query is shown, not the result.
If after that I create a new task, the query works again.


Maintenance note: Steps to reproduce, and screenshots, added by @claremacrae

  1. Create a note called Issue 3366 callout at startup
  2. Insert this content:
# Issue 3366 callout at startup

> [!NOTE]
> ```tasks
> path includes {{query.file.path}}
> ```

- [ ] #task Hello world
  1. Open 3 views of this note - in Source, Live Preview and Reading Mode
  2. Run the command Reload app without saving

Expected Behavior

tasks queries work on startup

Image

Current behaviour

query does not execute (in the Live Preview pane)

Image

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.8.7 (installer 1.7.7)

Tasks Plugin Version

7.18.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

No response

@uselpa uselpa added the type: bug Something isn't working label Mar 3, 2025
@uselpa
Copy link
Author

uselpa commented Mar 3, 2025

I can confirm that rolling back to 7.17.0 solves the problem.
I suppose it's linked to c219859.

@claremacrae claremacrae added the scope: callouts Issues with tasks or searches in Obsidian Callouts label Mar 3, 2025
@claremacrae
Copy link
Collaborator

claremacrae commented Mar 3, 2025

Many thanks for reporting this.

Update: I have added the steps to reproduce, given the severity of the issue.

Steps to reproduce

After updating to 7.18.0, callouts with imbedded task queries do no longer show properly when Obsidian is restarted - the source of the query is shown, not the result. If after that I create a new task, the query works again.

Thanks for using Tasks, and reporting this.

In order to investigate, we would need reproduction steps provided as text for us to copy, so for reasons explained in the following post, I am not yet able to investigate:

https://publish.obsidian.md/tasks/Support+and+Help/Report+a+Bug

If you can provide full text, and full numbered steps for a reproduction, as per the above, I will willingly have a look when I have time.

Thank you.

@claremacrae claremacrae added the question Further information is requested label Mar 3, 2025
@claremacrae
Copy link
Collaborator

@uselpa Cancel that, I have been able to reproduce it, but only when the note containing the query was in Live Preview mode.

Is that the case for you?
(This is why we ask for full details)

@claremacrae claremacrae added the priority: high A high priority/important request label Mar 3, 2025
@claremacrae claremacrae changed the title Tasks does no longer initialise properly Tasks does no longer initialise properly, for any Queries in Callouts in Live Preview, when already opened at start-up Mar 3, 2025
@claremacrae claremacrae added the display: live preview Issues referring to Obsidian's Live Preview mode label Mar 3, 2025
@claremacrae
Copy link
Collaborator

I've renamed this to more fully convey the observed behaviour.

@uselpa
Copy link
Author

uselpa commented Mar 3, 2025

@uselpa Cancel that, I have been able to reproduce it, but only when the note containing the query was in Live Preview mode.

Is that the case for you? (This is why we ask for full details)

Yes it is, and I am always working in that mode (except when debugging something) so I would not have thought to include that in the bug report, sorry.

@claremacrae
Copy link
Collaborator

Thanks,

As a workaround for now, you can close and re-open the note.

I will do a bug fix release to revert the change that caused the problem, hopefully later today.

@claremacrae claremacrae removed the question Further information is requested label Mar 3, 2025
@claremacrae
Copy link
Collaborator

I can confirm that rolling back to 7.17.0 solves the problem. I suppose it's linked to c219859.

Confirmed: the change in behaviour came from c219859.

@claremacrae
Copy link
Collaborator

claremacrae commented Mar 3, 2025

It only affects Tasks searches in Callouts, not those outside callouts:

# Issue 3366 callout at startup

> [!NOTE]
> ```tasks
> path includes {{query.file.path}}
> ```

```tasks
path includes {{query.file.path}}
```

- [ ] #task Hello world

Gives this, on reload:

Image

@claremacrae
Copy link
Collaborator

Hi @mnaoumov, may I pick your brains about a change in Tasks please, when/if you have time.

I took your suggestion to delay some initialisation:

c219859

It works fine in Reading Mode, but any Tasks code blocks in Callouts that were open in Live Preview do not now refresh at start-up...

Screenshot: #3366 (comment)
Repro steps: #3366 (comment)

Obviously I can easily revert the change, but is this something you have seen before? Do you have any suggestions please?

@mnaoumov
Copy link
Contributor

mnaoumov commented Mar 3, 2025

@claremacrae I would need to debug it. The behavior looks weird to me. I will let know once I debug it

@claremacrae
Copy link
Collaborator

Thank you. I've updated the comment above, to include the markdown used to generate that screenshot:

#3366 (comment)

@mnaoumov
Copy link
Contributor

mnaoumov commented Mar 3, 2025

@claremacrae provided the fix in the PR

@claremacrae
Copy link
Collaborator

Super - thank you very much indeed. Will pick this up soon....

@claremacrae
Copy link
Collaborator

I will release this later today....

@claremacrae claremacrae moved this from ✅ Done to 🎉 Released in Tasks (Obsidian plugin) Roadmap Mar 3, 2025
@claremacrae
Copy link
Collaborator

This is just released in Tasks 7.18.1.

Many thanks for the help, @mnaoumov!

@uselpa
Copy link
Author

uselpa commented Mar 3, 2025

This is just released in Tasks 7.18.1.

Many thanks for the help, @mnaoumov!

Can confirm that it works for me now.
Thanks for the quick response!

@ilandikov
Copy link
Collaborator

Just FYI I had the same bug in Canvas, also solved by the latest release =) Many thanks @mnaoumov !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display: live preview Issues referring to Obsidian's Live Preview mode priority: high A high priority/important request scope: callouts Issues with tasks or searches in Obsidian Callouts type: bug Something isn't working
Projects
Status: 🎉 Released
Development

Successfully merging a pull request may close this issue.

4 participants