WPML

Overview of the Issue

If you create a Gutenberg Gallery with the Jetpack plugin, you will see this error on the translation:

Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.php on line 738

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

  1. Make a full backup of your site.
  2. Open the wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.php file.
  3. Look for line 786.
  4. Change:
    $attachment_id = absint( $class_id[2] );
  5. With
    $attachment_id = apply_filters( 'wpml_object_id', absint( $class_id[2] ), 'attachment' );

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.