Brief bug description
When a content item contains a reference to another item that does not exist in the source environment, content snapshots fail.
The snapshot fails due to the error thrown in getMigrationElementToStore from migration-toolkit: https://github.com/kontent-ai/migration-toolkit/blob/d02256b3e1a4f437579a0e24c441e7c908b5578d/lib/export/export-manager.ts#L146-L160
Repro steps
- Via migration, create a content item with a value in a linked item field that does not exist
- Run
migrate-content snapshot
- Snapshot creation fails when mapping items and assets
Failed to map value of element 'references' of type 'modular_content'. Value: [{"id":"71c3e029-2b14-5515-a8a5-d1b703fbbb15"}]. Message: Missing item with id '71c3e029-2b14-5515-a8a5-d1b703fbbb15'
Expected behavior
The sync tool should maintain the broken reference that is in the source environment and log
Screenshots
