Repository navigation
Description
Search first
- I searched and no similar issues were found
What Happened?
When i import a page 2 times, it's content is duplicated.
Reproduce the Bug
- Create new clean graph
- Import page
{:pages-and-blocks
[{:page
{:build/tags #{:user.class/Grnspechte-kAb3rnMZ},
:build/properties
{:user.property/Gre-kWkFTZ_D 122,
:user.property/Bedroht-X7sIvDOk true,
:user.property/Farbe-Dcnb6mnk "Rot"},
:block/title "Günther Grünspecht"},
:blocks
[{:block/title "Er ist ein bunter Vogel. Sagt man auch."}]}],
:properties
{:user.property/Gre-kWkFTZ_D
{:db/cardinality :db.cardinality/one,
:logseq.property/type :number,
:block/title "Größe"},
:user.property/Bedroht-X7sIvDOk
{:db/cardinality :db.cardinality/one,
:logseq.property/type :checkbox,
:block/title "Bedroht"},
:user.property/Farbe-Dcnb6mnk
{:db/cardinality :db.cardinality/one,
:logseq.property/type :default,
:block/title "Farbe"}},
:classes
{:user.class/Grnspechte-kAb3rnMZ
{:block/title "Grünspechte",
:block/collapsed? false,
:build/class-extends #{:user.class/Vgel-Q0C0b7jy}},
:user.class/Vgel-Q0C0b7jy {:block/title "Vögel"}},
:logseq.db.sqlite.export/export-type :page}
- Import page again
Expected Behavior
The properties get updated, not duplicated. So why not the content?
I'm not sure what the best behavior would be.
A user might want to have multiple identical blocks? Like with running the CLI block upsert multiple times.
But usually i think not changing the content when the data from the import is already there would be preferable.
But a user might have the same journal line multiple times, because it happened multiple times. I had that in some cases.
We have the same data sync conflict resolution problem here.
Maybe don't duplicate if the whole page content is identical? But leave single lines alone when being present multiple times.
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
NixOS 25.11.10684.8fd9daa3db09
Logseq-linux-x86_64-2.0.1-alpha+nightly.20260622
Additional Context
Users where asking in Discord how they can merge graphs. This might lead to unexpected results.
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