Field formatters use media with wrong translation

Created on 18 September 2023, over 1 year ago

Problem/Motivation

Almost all field formatters load and use media entities with the default language instead of the current one.
It causes issues when the data might be rendered with the wrong translation.

Steps to reproduce

  1. Add to Bynder Document a new field, e.g. description
  2. Make Bynder Document media and field description translatable
  3. Make sure that you have at least 2 languages on the site
  4. Load Bynder Document media with default language and set some description value, e.g. DescriptionEN
  5. Add translation of this media and change the description value, e.g. DescriptionFR
  6. Configure view display for this media type, set Bynder (Document) formatter and configure Link Title field to show the description field
  7. Render this view mod on both site languages
  8. Expected: we should see DescriptionEN or DescriptionFR depending on current page language
  9. Actual: we always see only the value of the default language - DescriptionEN

Proposed resolution

Update the formatters to retrieve the current translation of the media.

πŸ› Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

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

Comments & Activities

Production build 0.71.5 2024