Dataview stops returning results

Things I have tried

I have googled, looked, and attempted to find someone who has had this problem but come up empty handed.

What I’m trying to do

I created a portable “TOC” generator (lists files in my folders) using Dataviewjs. I was able to create something functional using dataviewjs, but I started to get curious if I could do it using DQL. That’s when the trouble started.

The following chunk of code:

	link(,file.aliases[0]) as "Note",
	Comments as "Description"
	contains(file.path, this.file.folder) 
	AND !=
SORT file.alises[0] ASC

Stopped EVERY DQL from returning results, even after a restart of Obsidian. Even simple queries like:


produce empty results. No errors. The code is parsed correctly, but NOTHING IS RETURNED.

Any ideas?
And I can’t seem to figure out how to restart dataview. Strangely, dataviewjs blocks still work. It’s like I crashed the DQL engine or something.

Note: the dataviewjs code that works looks like this:

let this_page = dv.current();
let this_folder = '"';
this_folder += this_page.file.folder;
this_folder += '"'; 

let page_query = this_folder + ' AND -#HomeNote';
	["File", "Comments"], 
	dv.pages(page_query).sort(p => p.file.aliases[0])
	.map(p => [dv.fileLink(,false,p.file.aliases[0]), p.Comments])

The behavior you’re describing sounds strange. Do you get any errors in the console pane of the Developers Tool?

And you’re aware of the small typo on your sort-clause? I reckon it should be sort file.aliases[0] asc, and not alises?

I would also try to list both the this.file.path and this.file.folder as columns, instead of in the where clause, just to verify they both are what you expect them to be.

Thank you. It is strange. I did find the type-o with aliases. What seemed to fix it was a complete restart of everything. Now it seems to function. However, I have to admit I forgot to open the developer tool window and check the console. I believe there is also a way to do a “dump” of the system and plugins but I couldn’t find that either. (should have written that down in my vault!)

That is open command palette, cmd-p, and Show debug info, for later reference.

1 Like

Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.