Closed (fixed)
Project:
Default Content Deploy
Version:
2.2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2025 at 22:03 UTC
Updated:
6 May 2025 at 08:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
smulvih2Here is my exported media item:
Comparing this against another project using an older DCD version, this is missing items from
_links, specificallyuid,thumbnailandimage.Comment #3
smulvih2So from the JSON code above, it's missing this outside of _embedded:
The patch attached gets media items importing for me, although not a real solution, just to show what is needed for the fix to
$data.Comment #4
smulvih2Hmmm not sure actually, looks like with 2.1.x the field_media_image is actually under
_linksand not as it's own root-level array. Not sure the proper approach here.Comment #5
smulvih2So after looing at this in more detail, seems to be an export issue, not import. The export is missing the _links to the embedded content.
Comment #6
mkalkbrennerThe format changed. Most of _links at top level is not need for our use-case.
No, this is correct. Entity Reference fields are only in _embedded.
It seems to be an import related issue.
Comment #8
mkalkbrennerI was able to reproduce the issue if a module is installed that reacts to media entity updates. In our case, image_replace isn't fault tolerant. So default_content_deploy can't import the entity or fix the file ID later.
A quick fix is to handle files at the beginning of the import.
BTW that issue was hidden in previous versions. Meaning, it existed as well but didn't hurt because of the more verbose export format.
Comment #9
mkalkbrenner