htmlburger/carbon-fields

Media Gallery images not displaying in secondary language when using WPML

timpoole-ab opened this issue · 0 comments

Version

  • Carbon Fields: 3.6.3
  • WordPress: 6.5.3
  • PHP: 8.1
  • WPML: 4.6.11

Expected Behavior

Media Gallery thumbnail images should display on the admin screen when editing a page in a secondary language.

Actual Behavior

Media Gallery thumbnail images are displaying okay when editing a page in the default language, but not when editing a page in a secondary language. Grey container boxes for the thumbnails do appear, but there is no 'remove' button so the faulty image can not be deleted.

Container definition

Field::make( 'media_gallery', 'crb_header_banner_gallery', 'Images')
    ->set_type( array('image') )

Steps to Reproduce the Problem

  1. Set WPML to use the Classic Translation Editor.
  2. Include a Media Gallery field on pages.
  3. Set the relevant system fields (e.g. _crb_header_banner_gallery|||0|value) to something other than 'Don't translate'.
  4. Create a page in the default language.
  5. Click 'Select Attachments' to add images to the gallery and publish the page (images should display in the gallery).
  6. Whilst editing the page, switch to an alternative language using the language switcher in the admin bar.
  7. Click 'Overwrite with [default language] content'.
  8. Click 'OK' to accept the warning.

The gallery thumbnail images do not appear - just their container boxes.

Comments

Thank you for looking at this issue - a solution would be much appreciated.