Repository navigation
Description
Search first
- I searched and no similar issues were found
What Happened?
Summary
Two journal pages have become permanently corrupt with a validation error
that blocks all write operations including delete, making them impossible
to repair through any available tool (MCP API, CLI, EDN export).
Error message
[:db-invalid] {:msg "Validation errors", :errors
({:entity {:block/name "aug 14th, 2025" ...
:block/tags [{...} #{4 167} {:page-class-id 4, :all-page-class-ids #{3 4 2 167 168}}]},
:dispatch-key :normal-page,
:errors {36650 {:block/tags ["should not have other built-in page tags
when tagged with #Page"]}}}
Affected entities
| Field | Aug 14th | Nov 24th |
|---|---|---|
| Entity ID | 40497 | 44182 |
| UUID | 6ab3cdea-fe6c-4eda-ba44-a14e8bdb197e |
6ab3cdf0-eb84-41d8-bbfb-d956264b2d7c |
| block/name | aug 14th, 2025 |
nov 24th, 2025 |
| block/tags | [4 (#Page), 167 (#Journal)] |
[4 (#Page), 167 (#Journal)] |
These pages have both #Page (id: 4) and #Journal (id: 167) as
block/tags simultaneously, which violates the constraint that a page
tagged with #Page cannot have other built-in page tags.
Reproduction
Unknown — the corruption was discovered during DB migration from
Logseq OG (markdown) to DB version.
Reproduce the Bug
All write operations are blocked by the same validation error:
- Logseq MCP API —
delete_pageandupdate_pagetimeout with
Read timed out - Logseq CLI —
logseq remove page --id 40497returns
Failure(DB write failed with invalid data) - CLI by name —
logseq remove page --page "aug 14th, 2025"returns
Error (page-not-found) - EDN export — blocked by the same validation error
- Direct SQLite edit — not safe; the B-tree has multiple index
trees (EAVT, AEVT, AVET) that must be updated atomically
The validation prevents any repair because every write path runs
validation first.
SQLite location of corrupted data
Relevant kvs table addresses:
1056516— containsblock/tagsfor entity 40497 with both refs 4 and 1671057045— containsblock/tagsfor entity 44182 with ref 167
SELECT addr, substr(content,1,300) FROM kvs
WHERE content LIKE '%40497%' AND content LIKE '%tags%';Expected behavior
Either:
- The CLI
remove page --forceshould bypass validation and hard-delete
the entity, or - A repair command should be available to remove invalid built-in tags
from corrupt entities
Environment
- Logseq desktop, macOS
- DB graph migrated from Logseq OG (markdown)
- Graph name: local DB graph
Related issues
- enter->tab incorrectly indents and makes new empty line above logseq#795 (validation errors accumulating over time)
- Core outliner refactor logseq#1191 (built-in #Page tag conflict)
Expected Behavior
Possibility to delete these pages. Export in EDN gives same error.
Screenshots
No response
Desktop or Mobile Platform Information
Logseq 2.0.1, MacOS 26.6.2 (25G83)
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
Activity
yuxi-liu-wired commentedon Oct 29, 2026
Fixed in logseq/logseq#13911 (fix(storage, import): a failed store no longer leaves a graph that cannot reopen, batch rollback after commit, kv-store keeps keys, import page merges and #1378). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
yuxi-liu-wired commentedon Oct 30, 2026
The fix for this (with a reproduction: a journal file and a pages/ file for the same date, in either order) is now in logseq/logseq#13886; it moved there from #13911.
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date
fix(import): a page file for a journal's date does not tag the journa…
test(import): a page file imported before the journal file for its date