Hi
I have 2 problems with exporting media and files.
General System
- Core 8.4.5
- Setup a multilingual site with 2 languages (in my case English/German)
- Modules for default_content: better_normalizers, default_content, default_content_extra
Steps to recreate
1. Setup media (e.g. image or document)
2. Setup the translation for content & media. (Not file translation)
3. Create some content with media and some media entities and translate them so you have for example different files for each language.
Problem 1:
When I export untranslated content with references (dcer) which includes a media field: The node and the media entity are exported as well as the file for that language.
If the media entity is translated, I can see the information for the translated file in the media export. But the referenced file (the not used translated one) doesn't get exported.
I'm not sure if this works as designed (the file isn't used by the content therefore no export) or if the translated file should be exported as well because it's referenced by the media entity.
Problem 2:
Based on Problem 1 I then tried to the export (dcer) the translated media entity.
I expected at least here I would get the export of both files. But only the file in the original language is exported.
I had to manually export the file as well - then everything worked and I could import everything without having only half of my media files.
Best regards,
Caralin
Comments
Comment #2
damienmckennaPlease test out v2.0.x with the merge request from #2703607: drush command default-content-export-module-with-references and let us know if the problems are now resolved.
Comment #3
bernardm28 commentedJust ran into an issue that could be made its own or linked to this one.
Media items only seem to export the first language file. It defines a second file dependency when it finds a translated entity on it but it does not export that. Hence we run into media items that have no images in Spanish but work well in English.
As an example, you can test the following. Umami works well for the first one but it does not find any image files for the Spanish one even though it was exported as expected.
https://www.drupal.org/project/distributions_recipes/issues/3365143#comm...
This was with Drupal 11.1.1 and drupal/default_content:^2.0@alpha
Comment #4
bernardm28 commented