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
DB Graph Importer: user tag colliding with built-in property name (scheduled) produces invalid, undeletable entity #1009
I imported a file graph to a DB graph ("File to DB graph") with Import all tags checked. My file graph contained a block with the inline tag #scheduled:
- DONE figure out how to schedule things for [[February 22nd, 2021]] #scheduled
The import completed but reported "Import detected 14 invalid block(s)... See the javascript console for more." The console shows for the scheduled entity:
:errors
{:db/ident ["should be a valid user property namespace"],
:block/tags ["should only have one tag for a built-in entity"],
:logseq.property.class/extends {"user-property" ["disallowed key"]}}
Additionally, the resulting broken tag could not be deleted from the UI, so the graph cannot be repaired after import — the only recourse was to remove #scheduled from the source markdown and re-import from scratch.
Reproduce the Bug
Create a file graph containing a block with the inline tag #scheduled (lowercase; presumably any tag matching a built-in property name reproduces this)
Import via three dots menu → Import → File to DB graph, with Import all tags checked
Observe "Import detected N invalid block(s)" warning
Open the developer console (Ctrl+Shift+I) — the invalid entities are logged with their validation errors
Attempt to delete the scheduled tag from its page — deletion fails
Expected Behavior
The importer should detect user tags/properties whose names collide with built-ins and either (a) merge the usage into the built-in property, (b) rename the user tag (e.g. scheduled-user), or (c) warn and skip — but never produce an entity that fails graph validation. Independently, invalid entities should be deletable so the graph can be repaired without a full re-import.
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
Logseq 2.0.1 (Windows x64, NSIS installer), Windows 11 desktop app. File graph originally created circa 2020–2021 on older Logseq versions.
Additional Context
Fixed at source by removing #scheduled from the markdown and re-importing; the re-import was clean.
Are you willing to submit a PR? If you know how to fix the bug.
pnpm exec nbb-logseq script/db_import.cljs <file-graph-with-#scheduled> <db-name> -a -V
Without -a: Valid
With -a (Import all tags): previously created invalid :user.class/scheduled hybrid on top of :logseq.property/scheduled
Fix
convert-tag? no longer converts tags whose names collide with built-in property/class names (e.g. scheduled), so they stay page refs instead of overwriting the built-in entity uuid.
Does not reproduce on current master (d06ded9971): importing a file graph with #scheduled and #deadline (convert-all-tags on, as a journal tag, in a page file and as a tags:: value, and the exact line from this issue) creates a separate :user.class/scheduled tag and the graph validates. If it still happens for you on a recent build, the graph (or a small part of it) would help.
It does reproduce on current master with both in the same file: with convert-all-tags on, #scheduled on one block and scheduled:: true on another block of the same page give one entity user.class/scheduled that is both a class and a property, and the graph fails validation ("disallowed key"). A tag alone, as tried above, imports fine. A fix is being worked on.
Activity
LZong-tw commentedon Jul 31, 2026
Update: reproduced and fixed on master locally.
Repro (CLI)
-a: Valid-a(Import all tags): previously created invalid:user.class/scheduledhybrid on top of:logseq.property/scheduledFix
convert-tag?no longer converts tags whose names collide with built-in property/class names (e.g.scheduled), so they stay page refs instead of overwriting the built-in entity uuid.Regression test:
logseq.graph-parser.exporter-test/import-does-not-corrupt-built-in-property-when-tag-name-collidesWill open a PR shortly if not already up.
yuxi-liu-wired commentedon Oct 27, 2026
Does not reproduce on current master (d06ded9971): importing a file graph with
#scheduledand#deadline(convert-all-tags on, as a journal tag, in a page file and as atags::value, and the exact line from this issue) creates a separate:user.class/scheduledtag and the graph validates. If it still happens for you on a recent build, the graph (or a small part of it) would help.yuxi-liu-wired commentedon Oct 27, 2026
It does reproduce on current master with both in the same file: with convert-all-tags on,
#scheduledon one block andscheduled:: trueon another block of the same page give one entityuser.class/scheduledthat is both a class and a property, and the graph fails validation ("disallowed key"). A tag alone, as tried above, imports fine. A fix is being worked on.fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
1 remaining item
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…
fix(import): keep a tag and a property of the same name apart
fix(import): keep a tag and a property apart when an earlier file cre…