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
[Bug] Migrated assets from OG to DB are missing in Publish/Sync #1110
After migrating a graph from file-based (OG) mode to DB mode, migrated images/assets do not appear in Publish or Sync (shows not published), while they display correctly locally.
Root Cause:
During migration, build-new-asset in deps/graph-parser/src/logseq/graph_parser/exporter.cljs hardcodes :block/page and :block/parent to :logseq.class/Asset (the built-in class page) instead of the actual user page that references the asset.
The publishing filter in deps/publishing/src/logseq/publishing/db.cljs (filter-only-public-pages-and-blocks) only keeps entities whose :block/page points to a public user page. As a result, migrated assets are filtered out and their files are not included in the publish package.
In contrast, assets created by drag-and-drop in DB mode are correctly attached to the current user page and work normally in Publish/Sync.
Reproduce the Bug
Migrate an OG graph containing images to DB format.
Images display normally in the local DB graph.
Publish the graph (using “Only publish public pages” mode).
Migrated images are missing and clik the link will show "Page not published" on the published site.
(Control) Newly drag-and-dropped images in the same DB graph publish correctly.
Expected Behavior
Migrated assets should be attached to the user page(s) that reference them (same as drag-and-drop assets) and be properly included in Publish and Sync outputs.
Screenshots
local:
published:
Desktop or Mobile Platform Information
No response
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.
Still on current master (d06ded9971): build-new-asset (deps/graph-parser/src/logseq/graph_parser/exporter.cljs, around 1676-1681) always places an imported asset under the Asset class (:block/page and :block/parent), so filter-only-public cannot tell which page it belongs to. A fix needs a choice for an asset that several pages reference: put it under the first page that references it, under every one (one asset node each), or keep it under the Asset class and decide publishing by its references. Happy to implement the one you prefer.
Activity
yuxi-liu-wired commentedon Oct 27, 2026
Still on current master (d06ded9971):
build-new-asset(deps/graph-parser/src/logseq/graph_parser/exporter.cljs, around 1676-1681) always places an imported asset under the Asset class (:block/pageand:block/parent), sofilter-only-publiccannot tell which page it belongs to. A fix needs a choice for an asset that several pages reference: put it under the first page that references it, under every one (one asset node each), or keep it under the Asset class and decide publishing by its references. Happy to implement the one you prefer.