Skip to content

[Bug] Migrated assets from OG to DB are missing in Publish/Sync #1110

Open

Description

@ll1zt

Search first

  • I searched and no similar issues were found

What Happened?

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:

Image Image

published:

Image Image

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.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. transferred this issue fromlogseq/logseqon Aug 23, 2026
  2. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions