CLI: a text property value set with `--update-properties` keeps `[[Page]]` as typed and gets no ref to the page
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start with create-property-text-block! in deps/outliner/src/logseq/outliner/property.cljs and compare its text property path with the CLI block content path through :logseq.outliner/save-block-input and :logseq.outliner/insert-blocks-input in deps/outliner/src/logseq/outliner/input.cljs. Reproduce with upsert block --update-properties and inspect the value block's title and :block/refs. Done means [[Page]] is stored as a resolved page reference with the matching ref, including when the property is set during block creation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search first
- I searched and no similar issues were found
What Happened?
Setting a :default (text) property with upsert block --update-properties '{:<property> "with [[Page]]"}' stores the value block's title exactly as given. The link stays [[Page]] instead of becoming [[<uuid>]], and the value block gets no :block/refs, so the block does not show up in that page's linked references. The same happens when the property is set in the same call that creates the block.
Saving the value block's content once more (upsert block --id <value block> --content '<same text>') resolves the link and adds the ref, which is my workaround.
Values entered in the desktop app do not have this problem: in my graph, every text property value with a link that was typed in the app has it stored as [[<uuid>]], with the ref.
Reproduce the Bug
G=demo # any DB graph
id() { jq '.data.result[0]'; }
logseq upsert page --graph $G --page link-target >/dev/null
logseq upsert page --graph $G --page link-repro >/dev/null
logseq upsert property --graph $G --name link-text --type default >/dev/null
P=$(logseq list property --graph $G | grep -o 'user.property/link-text-[^ ]*')
B=$(logseq upsert block --graph $G --target-page link-repro --content holder --output json | id)
logseq upsert block --graph $G --id $B --update-properties "{:$P \"with [[link-target]]\"}" >/dev/null
V=$(logseq query --graph $G --query "[:find ?v . :in \$ ?b :where [?b :$P ?v]]" --inputs "[$B]")
value() { logseq query --graph $G --query '[:find (pull ?v [:block/title {:block/refs [:block/title]}]) :in $ ?v]' --inputs "[$V]"; }
value
logseq upsert block --graph $G --id $V --content "with [[link-target]]" >/dev/null
value
Output, run on 18-11-2026:
[{:block/title "with [[link-target]]"}]
[{:block/refs [{:block/title "link-target"}] :block/title "with [[6afe0a1f-d59f-4ac8-b938-a1da2e744ebb]]"}]
The first line is the value as --update-properties stored it, the second the same value block after the re-save. The result is the same whether the CLI started the graph's db-worker or the desktop app owns it.
Expected Behavior
A text property value set through the CLI is stored the way the desktop app stores it: [[Page]] resolved to [[<uuid>]], and the page in the value block's :block/refs.
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
Linux, logseq --version: revision dad8e9c (nightly 20261118).
Additional Context
logseq/logseq#13998 made CLI block content go through the Desktop editor's parser (:logseq.outliner/save-block-input and :logseq.outliner/insert-blocks-input in deps/outliner/src/logseq/outliner/input.cljs). A text property value takes a different path: create-property-text-block! in deps/outliner/src/logseq/outliner/property.cljs puts the string into the value block's title as it is, so its links are never resolved.
Found with the help of an AI coding assistant driving the CLI.
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 29
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di logseq/db-test
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogForse già presa @tiensonqin l’ha presa 59 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Disabling Flashcards in Settings does not disable Flashcard shortcuts or tagsForse già presa @tiensonqin l’ha presa 60 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Tutte le issue di logseq/db-test
Issue simili
-
bug_feature_triaged Team: Mojo Libraries
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
letsrevel/revel-backend#1520 ·
I maintainer di solito rispondono entro 1 giorno
-
backend enhancement good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#931 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diivi/aseprite-mcp#43 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
NCAR/MMM-physics#33 ·