Hi,
I have a problem with default query. On it’s own, the query works fine. But when I put it in default-queries, it does show the same number of results, but no table below.
Here’s the query I’m using.
:default-queries
{:journals
[{:title "Current"
:query [:find (pull ?p [*])
:where
(page-property ?p :status "🔥")]
:collapsed? false
}
]
}
Is this a bug, or am I doing something wrong? Other queries seem to work fine as default.
I believe, but don’t quote me on this, it’s because default queries only support block output and not table output.
When asking for pages Logseq automatically creates a table. In this case the table doesn’t render as it is not supported in this location.
I would say this is a feature request.
But this is just me speculating
2 Likes
I had a similar issue. See
opened 05:43AM - 16 Oct 22 UTC
query
settings
journals
### What happened?
When I am using the following query on my journal page
``` … Clojure
#+BEGIN_QUERY
{:title [:h4 "🪵 Logs"]
:query
[:find (pull ?p [*])
:where
(page-tags ?p #{"log"})
(page-property ?p :status "active")]
:collapsed? false
:breadcrumb-show? false
}
#+END_QUERY
```
it is giving the expected output. But when I place the query in the `graph-specific` `config.edn` file, then I doesn't show any output. The corresponding snippet from the `config.edn` file is as follows
``` clojure
:default-queries
{:journals
[
{:title [:h4 "🪵 Logs"]
:query
[:find (pull ?p [*])
:where
(page-tags ?p #{"log"})
(page-property ?p :status "active")]
:collapsed? false
:breadcrumb-show? false
}
]}
```
I have other default queries in the `config.edn` which work fine.
I am attaching a screenshot below. You'll notice that the journal query "Logs" returns 2 results which are then shown as a table. While below that you also see the heading from the default query "Logs", but there we do not see any output. Also notice that below another default query "Now" seems to be working fine and returns one result as expected.
### Reproduce the Bug
1. Create a page having `page-properties` as shown below:
```
tags:: [[log]]
status:: [[active]]
```
2. Create a query on the journal page of the form shown
``` Clojure
#+BEGIN_QUERY
{:title [:h4 "🪵 Logs"]
:query
[:find (pull ?p [*])
:where
(page-tags ?p #{"log"})
(page-property ?p :status "active")]
:collapsed? false
:breadcrumb-show? false
}
#+END_QUERY
```
3. Add this query as a `default-query` in the `graph-specific` `config.edn` file as
``` clojure
:default-queries
{:journals
[
{:title [:h4 "🪵 Logs"]
:query
[:find (pull ?p [*])
:where
(page-tags ?p #{"log"})
(page-property ?p :status "active")]
:collapsed? false
:breadcrumb-show? false
}
]}
```
### Expected Behavior
Both the journal query in step 2 and the default query in step 3 should give identical results.
### Screenshots
<img width="1368" alt="query_error" src="https://user-images.githubusercontent.com/45669486/196019852-f6b67085-c058-4a13-a010-3fe17db30e9e.png">
### Desktop Platform Information
macOS Monterey version 12.6, Chip Apple M1 Pro
Logseq Version 0.8.8
### Mobile Platform Information
_No response_
### Additional Context
_No response_
And how can I fix it? Because I see people having that in the main page of journals
Example of what those other people have?
I have same issue. I created “LATER” block yesterday but it does not show on journals page (neither other tasks) I journal i see only those which are relevat for specific day