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

Not all files shown in dataview file table #124

Closed
Moonbase59 opened this issue Apr 21, 2021 · 7 comments
Closed

Not all files shown in dataview file table #124

Moonbase59 opened this issue Apr 21, 2021 · 7 comments

Comments

@Moonbase59
Copy link

@Moonbase59 Moonbase59 commented Apr 21, 2021

I was just messing around with some obsidian:// URIs in my +Inbox folder when I detected that dataview doesn’t show all the files that Obsidian’s file explorer shows (mostly junk, in this case).

I have an +Inbox TOC file, created with the following dataview code:

table file.ctime, file.mtime
from "+Inbox"
where file.name != "+Inbox TOC"
sort file.mtime descending

and this is the result (note much more files in the file explorer side pane than dataview shows):

obsidian-dataview-bug-missing-files

There are surely some "junk" files in the +Inbox folder, but shouldn’t dataview show everything that Obsidian’s file explorer shows?

@Moonbase59
Copy link
Author

@Moonbase59 Moonbase59 commented Apr 21, 2021

I just found out that apparently dataview doesn’t show empty files!

This should be documented somewhere, please. I actually consider this a feature now, not a bug

@Moonbase59
Copy link
Author

@Moonbase59 Moonbase59 commented Apr 21, 2021

Hmm … or am I assuming?

I just put only the character "x" into one of the empty files, and it got listed. But when removing the "x" again, it still gets listed.

Does dataview use some caching or needs to be refreshed somehow? What might be the cause?

@filmgal
Copy link
Sponsor

@filmgal filmgal commented Apr 21, 2021

There is (was?) an issue with refreshing pages in dataview. For now, to refresh immediately, make a slight change to the rules then remove the change. That ought to do the trick. Exiting Obsidian also does the trick. Other than that, things do refresh, I just don't know what the intervals are right now.

@Moonbase59
Copy link
Author

@Moonbase59 Moonbase59 commented Apr 21, 2021

Hm. Seems a caching/refreshing problem after all. I had my +Inbox TOC open in preview mode, quit Obsidian, restarted, and it showed 0 results. Then went into edit mode (no changes) and back to preview, and voilà—all files (including a zero-byte "Untitled") were shown.

Btw, editing the dataview code (and back) didn’t make the new file appear. It only showed after the above process.

Kinda makes dataview unreliable somehow, should be found & fixed, I think.

@blacksmithgu
Copy link
Owner

@blacksmithgu blacksmithgu commented Apr 22, 2021

Looks like I need to track more events than just vault.changed. I've improved indexing by also listening for renames and file creation/deletion, and made views auto-reload every 5 seconds (configurable) - it should fix wierd issues like this.

@blacksmithgu
Copy link
Owner

@blacksmithgu blacksmithgu commented Apr 22, 2021

Fixed in 0.2.13.

@Moonbase59
Copy link
Author

@Moonbase59 Moonbase59 commented Apr 22, 2021

@blacksmithgu Thanks for caring! Installed 0.2.14 today, and the problems seem gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants