Export misses translated reference fields

Created on 25 March 2024, 3 months ago
Updated 24 April 2024, 2 months ago

Problem/Motivation

When an entity is translatable (ex. a node) and it has entity entity reference fields that are translatable (ex. a file field) the default_content_deploy exporter does not export any of the translated references.

Steps to reproduce

1. Enable a second language (ex. French)
2. Create a translatable content type
3. Add a translatable file field
4. Create a node in the default language (en)
5. Upload an en PDF
6. Translate the node to fr
7. Upload a fr PDF
8. Export your node using default_content_deploy with references

You will find there is only one PDF file exported and that is the en PDF.

Proposed resolution

Iterate over translation language when building referenced entities.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada joel_osc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @joel_osc
  • Status changed to Needs review 3 months ago
  • πŸ‡¨πŸ‡¦Canada joel_osc

    Here is a patch that fixes the issue.

  • πŸ‡¨πŸ‡¦Canada smulvih2 Canada 🍁

    This patch is definitely needed. If users add a media item to French content, that is unique to that language (not a translation of the English media item), then that media item would not be exported as a reference.

    Updating patch slightly to remove $language which is not used in this method.

Production build 0.69.0 2024