twill icon indicating copy to clipboard operation
twill copied to clipboard

Non-translated media fields display as empty

Open daun opened this issue 4 years ago • 2 comments

Description of the issue:

On a site with translated media fields, using a non-translated media field will display the field as empty in the edit form even though it is saved correctly in the database and holds data.

Steps to reproduce:

  1. Enable translated media form fields by setting twill.media_library.translated_form_fields to true
  2. Add a non-translated media form field to a module form by setting its translated parameter to false
  3. Open the edit form for a single entry of that module
  4. Attach an image from the media library to the non-translated media field
  5. Save changes
  6. Reload browser window

Expected behavior:

The media relation is saved in the database and displayed in the edit form on reload.

Actual behavior:

The media relation is saved correctly but the media form field is empty on reload.

Notes:

I think the translated_form_fields shouldn't be global. Some fields require it, some don't, so there should be a way of overriding the global setting for single fields. Twill's data structure is set up well for handling this. It's probably a question of how to detect the data format.

daun avatar Dec 09 '19 16:12 daun

Same issue here... Activating translated_form_fields on an existing project breaks the already defined media fields

agnonym avatar Feb 10 '20 17:02 agnonym

Same here, Does anyone have a solution to this issue?

petertsoisstuff avatar Oct 05 '22 06:10 petertsoisstuff