sytone / obsidian-queryallthethings

Query all your data stored in Obsidian, this plugin allows SQL based queries against the data collections available in Obsidian and Dataview. Output can then be rendered by Handlebars
https://sytone.github.io/obsidian-queryallthethings/
MIT License
115 stars 2 forks source link

Dataview errors pervent building qatt cache #28

Open gentzeng opened 1 week ago

gentzeng commented 1 week ago

Describe the bug qatt blocks do not render. It seems that dataview interferes the qatt cache building. Tested with Version 1.1.1 to 1.1.3

To Reproduce Steps to reproduce the behavior:

  1. Open obsidian
  2. open dev console
  3. see error -> screenshots

Expected behavior qatt blocks render

Screenshots Dataview refresh error 2024-10-02 15-11-31 +0200

Desktop (please complete the following information):

Smartphone (please complete the following information):

sytone commented 1 week ago

I validated the new build with a clean vault. However dataview was not enabled. I do not have it enabled on my vault either.

I am remote at the moment but if dataview is disabled does the error still happen?

I am considering removing the dataview integration as I do not have larger coverage for it and I no longer use it.

gentzeng commented 1 week ago

Thanks for your fast replies!

I made a video of a test vault. No dataview, but still no cache building. It's almost as if it just happens randomly that the files are not indexed for/by qatt.

https://github.com/user-attachments/assets/15afbd75-e783-4a3e-8051-077fe83fe48d

sytone commented 1 week ago

I just enabled Dataview on my main vault and things defiantly broke in the settings but no exceptions. I also completely removed it as well as tried it with it installed but disabled and did not see the exceptions you are seeing. Will make a vault shortly to see if I can reproduce.

sytone commented 1 week ago

Ok, I did the following.

Query:

query: |
  SELECT * FROM obsidian_notes
template: |
  {{#each result}}
    - {{basename}}
  {{/each}}

I am not sure where these exceptions are coming from. Can you share your data.json in the plugins folder so I can see the settings being used for qatt? There may be something different there? Please ensure you remove and personal information before posting it.

Note: I did have it once not render the block but closing and opening the page I had the query on resolved that. There is still a race condition somewhere on start where a opened page may or may not update after initial cache/debounce window is passed and I have not been able to reproduce.

gentzeng commented 1 week ago

My testvault, that one of the last video, has qatt-1.1.3. data.json looks like this:

{
  "onStartSqlQueries": "CREATE TABLE my_lookup(name,birthday);\nINSERT INTO my_lookup VALUES (\"fred\", 2000-02-03);",
  "announceUpdates": false,
  "version": "",
  "mainHeadingOpen": true,
  "generalHeadingOpen": true,
  "internalLoggingConsoleLogLimit": 10,
  "disableDataviewMissingNotification": false,
  "disableCustomJsMissingNotification": false,
  "enableEditorRightClickMenu": true
}

The settings page of qatt does not have a decounce option. Do i have to manually add that? qatt 1 1 3 settings 2024-10-02 22-53-39 +0200

sytone commented 1 week ago

No, it is missing settings. I saw this when dataview was on. When it was off all settings were showing but I did not see an exception with the creation of settings so that was on the backlog and assumed it was just me.

If you toggle one of the settings and then close and open it do you still just see this limited set?

gentzeng commented 1 week ago

No, the set of settings still is the same

gentzeng commented 1 week ago

I don't know why but it currently works. No errors in the console and the debouncing works perfectly. Also, all the settings are now visible :shrug:

sytone commented 1 week ago

Ok. So there is something weird with one of the internal services. I'm going to try and remove dataview to see if it happens again. Process of elimination to track this one down.