BUG: Importing a dump via cr:import
will create duplicate content stream entries
#4298
Closed
1 task done
Is there an existing issue for this?
Current Behavior
Using
cr:import
instead ofcr:migratelegacydata
to set up a neos 9 instance will result in:ContentStreamWasCreated
incr_default_events
cr_default_p_contentstream
will have two entries with the samecontentStreamId
and differentstates
Example import result:
Why does this matter?
I stumbled upon this while using the cli command
./flow contentstream:prune --remove-temporary
based on the data dump included inNeos.Demo
. Running./flow contentstream:prune --remove-temporary
removed the live workspace in my test installation so I investigated what caused this.The
ContentStreamFinder
will remove the temporary entries ofstate
CREATED
orFORKED
so why are there multiple entries for the live workspace?Why does this happen?
The
cr:export
command will export all events from the contentstream connected to thelive
workspace. This includes the first eventContentStreamWasCreated
, which in comparison is not included in the events generated bycr:migratelegacydata
.As the
EventStoreImportProcessor
creates the contentstream and the live workspace before applying all events to import we end up with the described result.neos-development-collection/Neos.ContentRepository.Export/src/Processors/EventStoreImportProcessor.php
Lines 113 to 143 in 26adf21
Expected Behavior
The contentstream for the live workspace should only be created once.
Steps To Reproduce
Reproduce with a newlyy created site:
./flow cr:setup
)./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage
./flow cr:export --path=./crExportTest
./flow cr:prune
./flow cr:import --path=./crExportTest
Reproduce via Neos.Demo dump:
./flow cr:setup
)Site
in your installation (./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage
)./flow cr:prune
./flow cr:import ./Packages/Sites/Neos.Demo/Resources/Private/Content/
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: