Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Gallery images not displaying in secondary language when using WPML #1233

Open
timpoole-ab opened this issue May 22, 2024 · 0 comments

Comments

@timpoole-ab
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant