Advanced query on page : broken link

Hello experts,

I’m stuck on the rendering of my advanced query :frowning:
This query will find all the pages tagged with the page I’m currently on.
(Use-case scenario : current page is a contact page, and tagged pages are project pages this contact is responsible for )

{:title [:h3 “:eyes: Related projects”]
:query [:find ?name
:in $ ?tag
[?t :block/name ?tag]
[?p :block/tags ?t]
[?p :block/name ?name]
:inputs [:query-page]
:view (fn [result]
(for [page result]
[:a {:href (str “#/page/” page )} page]
:collapsed? false}


The result is the correct one but as soon as I click on the link, logseq becomes blank.

I lacking knowledge on datalog to identify the error in the way I render the result.

has anyone an idea ?

High chances that the linked page’s name contains invalid characters (e.g. /). If so, try it with a different page of a safe name.

Yes, this is because of the / in the name.
Use this page link instead:
[:a {:href (str "#/page/" (clojure.string/replace page "/" "%2F"))} page]