You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Converting a page to a block (removing its Page tag) leaves child blocks' :block/page pointing at the demoted block #1424
In a DB graph, a page nested under another page can be converted to a block by removing its [[Page]] tag (the outliner validation allows page→block conversion when the page has a parent, is not under Library, and has no page children).
The conversion re-points the demoted block's own:block/page to the parent page, but its child blocks' :block/page still points to the demoted block — which is no longer a page. All descendants are left dangling:
;; after converting "Nested Page" (parent: "Demote Parent") to a block:
;; the demoted block itself — correctly re-pointed to the parent page
:block/page 193 ; "Demote Parent" ✓
;; its former child block — still pointing at the demoted, non-page block
:block/page 196 ; 196 = the demoted "Nested Page" block ✗
Consequences: the child blocks no longer belong to any real page, so they disappear from the parent page's content (page content is assembled via :block/page), and page-scoped features (linked references, queries, search scope, export) miss or misattribute them. The child blocks' :block/page should be re-pointed to the demoted block's parent page when the conversion happens.
Reproduce the Bug
In a DB graph, create a page and nest it under another page (e.g. drag the page under a block of another page). Example: page "Nested Page" under page "Demote Parent"
Add a block under "Nested Page", e.g. child block under nested page
Open "Nested Page" and remove its [[Page]] tag (via the tag popup). The page converts to a block under "Demote Parent"
Inspect the child block's :block/page (e.g. CLI: logseq show --id <block-id>, or a datascript query)
It still points to the demoted "Nested Page" block instead of being re-pointed to "Demote Parent"
Expected Behavior
No response
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
Logseq Desktop v2.0.2
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.
Fixed in logseq/logseq#13882 (fix(db): deleting or converting a node no longer leaves what depended on it broken). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.
Activity
fix: re-point descendants when converting page to block
fix(pipeline): keep a nested page's blocks on their page when a page …
yuxi-liu-wired commentedon Oct 27, 2026
Fixed in logseq/logseq#13882 (fix(db): deleting or converting a node no longer leaves what depended on it broken). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix(pipeline): re-point a demoted page's blocks to its parent page
fix(pipeline): keep a nested page's blocks on their page when a page …
fix: re-point descendants when converting page to block
fix: re-point descendants when converting page to block (logseq#13669)
fix(ui): align LUI desktop web UX with master (#14071)