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

Error with Tasks in Titled Callouts – Obsidian v1.6.0 to v1.6.4 [fixed by making v1.6.5 recreate its cache] #2890

Closed
3 of 7 tasks
damclarkd opened this issue Jun 9, 2024 · 27 comments · Fixed by #2905
Closed
3 of 7 tasks
Labels
obsidian Requires an update from Obsidian priority: high A high priority/important request scope: callouts Issues with tasks or searches in Obsidian Callouts type: bug Something isn't working type: no action needed Conclusion of the discussion was that no changes to Tasks are required

Comments

@damclarkd
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

Running Tasks Query on the current file.path should find all Tasks in Callouts.

Current behaviour

Starting in Obsidian V1.6.3, What I have been able to reproduce is when I have nested callouts, the number of tasks in the query is incorrect based on the number of callout levels.
i.e.
I have: Header Callout(Month), then Group Callout, then Task Callout. In the Task Callout I have four Tasks. In the Query it will ignore the first three tasks. If I remove the Header Callout and have only two levels of nested Callouts, it will ignore only the first two Tasks.
Basically -- The number of nested callouts = number of ignored Tasks. If 3 callouts nested, only Task4 is found.
The Query is simply:

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

And the test md is:

 > [!Calendar]+ MONTH
 >> [!Check]+ GROUP
 >>> [!Attention]+ Correction TITLE
 >>> Some stuff goes here
 >>> - [ ] Correction1
 >>> - [ ] Correction2
 >>> - [ ] Correction3
 >>> - [ ] Correction4

Steps to reproduce

  1. Using Obsidian V1.6.3. Both my personal vault and the Sandbox vault.
  2. In the Sandbox vault, Install Tasks plugin.
  3. No other plugins added.
  4. Use task query above and sample test md.

Which Operating Systems are you using?

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

Obsidian Version

1.6.3

Tasks Plugin Version

7.4.0

Checks

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

Possible solution

This appears to be an Obsidian problem not a Tasks issue.

@damclarkd damclarkd added the type: bug Something isn't working label Jun 9, 2024
@claremacrae
Copy link
Collaborator

Created after Q&A:

@claremacrae
Copy link
Collaborator

I have reported my findings to the Obsidian devs informally in this and the next few Discord posts.

Basically, Obsidian is reporting that the 4 tasks in the file are on different lines to what they actually are, and Tasks uses that info from Obsidian to find the task lines.

I will add the obsidian label to this, as it is a problem outside of Tasks' control.

@claremacrae claremacrae added scope: callouts Issues with tasks or searches in Obsidian Callouts obsidian Requires an update from Obsidian labels Jun 9, 2024
@claremacrae
Copy link
Collaborator

There are multiple reports of issues with tasks in callout in Obsidian 1.6.3 already in the Forum:

https://forum.obsidian.md/t/last-checkbox-in-a-callout-cant-be-clicked/82742/3

The above says it will be fixed in 1.7 - no ETA.

@georgziganek
Copy link

I'm not sure this is part of the same issue, but it seems like it:

When you have a task in a callout and you use a custom label for the Callout, the first task in the callout is NOT being picked up by the task query.

Here is an Example of a callout with a custom label and two tasks

image

Here is the tasks query:

image

Here is the rendered tasks query:

image

As you can see, the first task is missing in the query. If I now remove the custom label from the callout, I get the following block:

image

This block is now rendered correctly as following in the tasks query:

image

Can someone reproduce this? Is this part of the issue from 1.6.3 or an issue from tasks?

Thanks in advance for the help!

@claremacrae
Copy link
Collaborator

@georgziganek, thanks for the info. If you want someone to try reproducing it, please post text for people to copy and paste. Thank you.

@georgziganek
Copy link

georgziganek commented Jun 10, 2024

@claremacrae Sure, no problem!

Here's the text block:

> [!todo]
>- [ ] This is the first task in the callout
>- [ ] This is the second task in the callout

and here is the query. You'll have to update the folder path accordingly.

```tasks
not done
folder includes 00 - Fleeting Notes/Test
short mode
```

@damclarkd
Copy link
Author

By removing all my custom callout labels, I can verify that the Task query worked as it should and returned all tasks.

@claremacrae
Copy link
Collaborator

Awesome - thank you both very much indeed!

@tuxruffian
Copy link

I'm also experiencing this issue with:
Obsidian: 1.6.3 (Windoz)
Tasks: 7.4.0

Any task created inside any callout box will not be Listed in a Tasks query, but if I move the task outside the Callout, it shows up.

@claremacrae
Copy link
Collaborator

claremacrae commented Jun 13, 2024

By removing all my custom callout labels, I can verify that the Task query worked as it should and returned all tasks.

Yes, I have confirmed this. It is specifically the labels on callouts that cause a task to be not found.

For each labelled callout, Obsidian adds 1 to the line numbers it reports for the locations of the task lines and tags inside the callout.

There are 3 callouts with labels here, meaning that only the 4th (and any later) to be read by Tasks:

 > [!Calendar]+ MONTH
 >> [!Check]+ GROUP
 >>> [!Attention]+ Correction TITLE
 >>> Some stuff goes here
 >>> - [ ] #task Correction1
 >>> - [ ] #task Correction2
 >>> - [ ] #task Correction3
 >>> - [ ] #task Correction4

There are 0 callout labels here, so all 4 tasks are found:

 > [!Calendar]+
 >> [!Check]+
 >>> [!Attention]+
 >>> Some stuff goes here
 >>> - [ ] #task Correction1
 >>> - [ ] #task Correction2
 >>> - [ ] #task Correction3
 >>> - [ ] #task Correction4

It does not matter whether they are custom callouts, or nested - or whether they are collapsible: the issue is the labels on the callout lines.

@claremacrae claremacrae changed the title Error with Tasks in Nested Callouts – Obsidian V1.6.3 Error with Tasks in Labelled Callouts – Obsidian V1.6.3 Jun 13, 2024
@claremacrae
Copy link
Collaborator

I have renamed the issue to clarify that the problem is labelled callouts, not nested ones.

@claremacrae
Copy link
Collaborator

And again, the issue is Obsidian giving incorrect line numbers in this situation.

@claremacrae
Copy link
Collaborator

I have written up all my research on this here:
https://forum.obsidian.md/t/checkbox-in-a-callout-cant-be-clicked-or-checks-the-wrong-item/82742/8?u=claremacrae

Also, I note that the Obsidian team is now saying this will be fixed in 1.6.4 instead of 1.7 - still no ETA, of course.

@georgziganek
Copy link

Magnificent, thanks for escalating this in the Obsidian Forums!

@claremacrae
Copy link
Collaborator

Obsidian 1.6.4 has been released to Insiders.

It says it has fixed the problems with callouts.
https://obsidian.md/changelog/2024-06-20-desktop-v1.6.4/

Fixed toggling checkbox on the last line of a file or callout.

Unfortunately, I am not seeing any improvements to the behaviour described in this issue.

@damclarkd
Copy link
Author

I can also confirm that this update had no impact on the issue. Still missing tasks in query if custom labels used in callouts.

@claremacrae
Copy link
Collaborator

Ah - it turns out that the fix requires knowing that an edit needs to be made anywhere in the markdown file containing the labelled callout, in order to force Obsidian to re-parse the file and generate correct line numbers.

After a couple of seconds of inactivity, the cached data will be updated.

Don't Undo the edit, as apparently the cached data would then be reverted.

You will need to do this in all your files that contain labelled callouts.

@damclarkd
Copy link
Author

Can confirm! Adding an edit immediately brought back the proper tasks query results.
Many thanks for following up on this.

@claremacrae
Copy link
Collaborator

I have written up all my research on this here: https://forum.obsidian.md/t/checkbox-in-a-callout-cant-be-clicked-or-checks-the-wrong-item/82742/8?u=claremacrae

Also, I note that the Obsidian team is now saying this will be fixed in 1.6.4 instead of 1.7 - still no ETA, of course.

My comments have been separated out to a new report, so the research is now detailed at:
https://forum.obsidian.md/t/tasks-inside-callouts-have-incorrect-positions-in-the-cache/84057

@claremacrae claremacrae changed the title Error with Tasks in Labelled Callouts – Obsidian V1.6.3 Error with Tasks in Labelled Callouts – Obsidian V1.6.3 (and V1.6.4 until the file with the callout has been edited) Jun 21, 2024
@claremacrae claremacrae changed the title Error with Tasks in Labelled Callouts – Obsidian V1.6.3 (and V1.6.4 until the file with the callout has been edited) Error with Tasks in Labelled Callouts – Obsidian v1.6.3 (and v1.6.4 until the file with the callout has been edited) Jun 21, 2024
@claremacrae claremacrae changed the title Error with Tasks in Labelled Callouts – Obsidian v1.6.3 (and v1.6.4 until the file with the callout has been edited) Error with Tasks in Labelled Callouts – Obsidian v1.6.3 (and v1.6.4 until file with callout is edited) Jun 21, 2024
claremacrae added a commit that referenced this issue Jun 21, 2024
…outs

This required forcing Obsidian to regenerate its cache for the following files,
by editing them, so its fix for its cause of #2890:

- callout_labelled.md
- callouts_nested_issue_2890_labelled.md
claremacrae added a commit that referenced this issue Jun 21, 2024
test: Add tests of Obsidian cache with labelled callouts - see #2890
@claremacrae
Copy link
Collaborator

I didn't intend #2905 to auto-close this issue.

@claremacrae claremacrae added priority: high A high priority/important request status: in progress At least a partial implementation exists, either work-in-progress or some implementation ideas labels Jun 21, 2024
@claremacrae claremacrae changed the title Error with Tasks in Labelled Callouts – Obsidian v1.6.3 (and v1.6.4 until file with callout is edited) Error with Tasks in Titled Callouts – Obsidian v1.6.3 (and v1.6.4 until file with callout is edited) Jun 23, 2024
@claremacrae
Copy link
Collaborator

Hi, I've written documentation for the Tasks plugin about the underlying Obsidian issue:

Missing tasks in callouts with some Obsidian 1.6.x versions

I will update the page as the Obsidian behaviour improves.

@claremacrae claremacrae added type: no action needed Conclusion of the discussion was that no changes to Tasks are required and removed status: in progress At least a partial implementation exists, either work-in-progress or some implementation ideas labels Jun 23, 2024
@claremacrae
Copy link
Collaborator

Now that I have written Tasks docs about this, I've labelled this issue as 'no action needed', as it really is an Obsidian issue and needs to be fully fixed in Obsidian.

@claremacrae
Copy link
Collaborator

Now that I have written Tasks docs about this, I've labelled this issue as 'no action needed', as it really is an Obsidian issue and needs to be fully fixed in Obsidian.

But I'll leave this open, and pinned, until there is a fixed public Obsidian release.

@claremacrae claremacrae pinned this issue Jun 23, 2024
@damclarkd
Copy link
Author

The Tasks docs write-up is well done and should help guide other users with similar callout issues. Thank you for all the efforts here!

@claremacrae
Copy link
Collaborator

Thank you @damclarkd - it did take a ridiculously long time to try and shrink down all the information into a useful structure, so I appreciate your kind comment greatly.

@claremacrae
Copy link
Collaborator

From the Obsidian team:

In version 1.6.5 a new advanced settings has been introduced to force rebuild the metadata cache.

If you are affected by this issue, go to Settings → Files and links → Advanced → Rebuild vault cache.

You will need to do this on all vaults, on all devices...

I've updated the Tasks notes on this issue.

@claremacrae claremacrae changed the title Error with Tasks in Titled Callouts – Obsidian v1.6.3 (and v1.6.4 until file with callout is edited) Error with Tasks in Titled Callouts – Obsidian v1.6.0 to v1.6.4 [fixed by making v1.6.5 recreate its cache] Jun 26, 2024
@claremacrae
Copy link
Collaborator

I'm closing this now, as no further action is needed in Tasks...

This issue is pinned, so it will still be visible to any users that come to the Tasks repo to report the problem...

@claremacrae claremacrae closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2024
@claremacrae claremacrae unpinned this issue Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
obsidian Requires an update from Obsidian priority: high A high priority/important request scope: callouts Issues with tasks or searches in Obsidian Callouts type: bug Something isn't working type: no action needed Conclusion of the discussion was that no changes to Tasks are required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants