Hi again, sorry for opening another troubleshooting topic. I am still in the process of transioning some stuff from pre 0.7 to the current version, and I can’t make some older queries to work.
So I have one example page called proj1 living in a Projects folder.
Then I have a second page called action1 living in an Actions subfolder. This action page has the following frontmatter:
I would like to see this action in the proj1 page (and any other action with the project: proj1 in frontmatter). Before I was using the following query (simplified here) on the proj1 page:
action where project = {{@page.name}}
But if I apply this now (with or without curly brackets) I get no results:
What was weird is that a query like action where status = active, works flawlessly, what I am missing?
I went through the Live Queries and and Query Language docs but I don’t see anything wrong with the above approach.
Ah, the problem is the “in the Projects” folder bit. You’re doing an exact match, meaning action where project = @page.name would translate to action where project = "Projects/project1" which wouldn’t match, because it’s set to project1. What you could do — although a bit hacky — is get rid of the Projects/ prefix:
action where project = replace(@page.name, /^Projects\//, "")
How to debug these things in general: write some simpler queries and see what the values actually are. It’s easy to just use a temporary template to find these things out:
```template
Matching project against {{@page.name}}
in query:
{{{action select project}}}
```
Uh, yeah makes total sense. I switched to folders when upgrading to 0.7, that’s also why I didn’t have that issue before. The hacky solution works, I’ll see if it’s worth switching back to no folders or keep the hack, thanks a lot for the help
And thanks for the debugging suggestion, I’ll keep that in mind ^^