CLI: a text property value set with `--update-properties` keeps `[[Page]]` as typed and gets no ref to the page
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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!)
- 主要语言
- 没有语言数据
- 星标
- 29
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
logseq/db-test 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialog可能已有人在做 @tiensonqin 于 59 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
Disabling Flashcards in Settings does not disable Flashcard shortcuts or tags可能已有人在做 @tiensonqin 于 60 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
jembi/openhim-core-js#1243 ·
-
go good first issue test
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
writerslogic/scrivener-mcp#272 ·
维护者通常 1 天内回复
-
bug external-issue to-triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 3-5 天 新手友好度 62/100
syuratick/LoveQuiltsUSA#39 ·