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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on queries with properties on published logseq graph #7332

Closed
MarceloCajueiro opened this issue Nov 14, 2022 · 1 comment 路 Fixed by #8301
Closed

Error on queries with properties on published logseq graph #7332

MarceloCajueiro opened this issue Nov 14, 2022 · 1 comment 路 Fixed by #8301

Comments

@MarceloCajueiro
Copy link

What happened?

The query below works fine in local Logseq, but when published, it breaks.

query-table:: true
query-properties:: [:page :birthday]
query-sort-by:: birthday
query-sort-desc:: false
#+BEGIN_QUERY
{:title "馃巶 Next birthdays 馃巶"
 :query
 [:find
   ?birthday ?page
  :in $ ?start ?next
  :where
  [?b :block/properties ?properties]
  [(get ?properties :birthday) ?birthday]
  [?b :block/left ?page]
  [?b :block/ref-pages ?p]
  [?p :block/journal? true]
  [?p :block/journal-day ?d]
  [(< ?d ?next)]
  [(>= ?d ?start)]]
 :table-view? true
 :inputs [:today :30d-after]}
#+END_QUERY

I think is because of the properties. You can see the published graph here.

Reproduce the Bug

  1. Create a graph with the related query;
  2. Publish;
  3. Open the published graph;
  4. The query will not work.

Expected Behavior

To load the query as locally.

Screenshots

Locally:
image

Published:
image

Desktop Platform Information

Browser Brave: Version 1.45.118 Chromium: 107.0.5304.91 (Official Build) (arm64)
macOS Ventura 13.0

Mobile Platform Information

No response

Additional Context

No response

@bnm12
Copy link

bnm12 commented Jan 5, 2023

I'm also experiencing this
image
image
https://reactjs.org/docs/error-decoder.html/?invariant=31&args[]=object%20with%20keys%20%7Bfe%2C%20name%2C%20aa%2C%20te%2C%20X%2C%20ca%7D

Manually removing the query-table:: and query-sort-* properties in the .md file fixed it for me. The table property is a holdover from when I had a simple query in the style of {{query property character-type NPC}} and for some reason it stuck around even after deleting the entire block and adding a new one. In fact deleting this block and adding it back somehow still preserves the properties so I had no way of removing it (or the sorting) outside of going into the .md file manually

Maybe it's an issue with having more than one property before the query? Either that or only query-properties:: work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants