diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index 968955293..4136afb 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -60,8 +60,10 @@ function content_translation_field_sync_widget(FieldDefinitionInterface $field, // The actual checkboxes are sometimes rendered separately and the parent // element is ignored. Attach to the first option to ensure that this // does not get lost. - $element[key($options)]['#attached']['drupalSettings']['contentTranslationDependentOptions'] = ['dependent_selectors' => - [$element_name => $require_all_groups_for_translation], + $element[key($options)]['#attached']['drupalSettings']['contentTranslationDependentOptions'] = [ + 'dependent_selectors' => [ + $element_name => $require_all_groups_for_translation + ], ]; $element[key($options)]['#attached']['library'][] = 'content_translation/drupal.content_translation.admin'; } diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index ea92153..c8c47d9 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -52,7 +52,7 @@ function content_translation_update_8001() { */ /** - * Clear field type plugin caches to make the new require_all_groups_for_translation flag available. + * Clear field type plugin caches to fix image field translatability. */ function content_translation_update_8002() { \Drupal::service('plugin.manager.field.field_type')->clearCachedDefinitions(); @@ -61,4 +61,3 @@ function content_translation_update_8002() { /** * @} End of "addtogroup updates-8.0.x". */ - diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index 89b6336..f139178 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -210,7 +210,7 @@ function content_translation_entity_base_field_info(EntityTypeInterface $entity_ * that making this column group translatable requires all others to be * translatable too. * - * @see Drupal\image\Plugin\Field\FieldType\ImageItem. + * @see Drupal\image\Plugin\Field\FieldType\ImageItem */ function content_translation_field_info_alter(&$info) { foreach ($info as $key => $settings) { diff --git a/core/modules/image/src/Tests/ImageFieldTestBase.php b/core/modules/image/src/Tests/ImageFieldTestBase.php index f96f9f2..79148a3 100644 --- a/core/modules/image/src/Tests/ImageFieldTestBase.php +++ b/core/modules/image/src/Tests/ImageFieldTestBase.php @@ -162,7 +162,8 @@ function uploadNodeImage($image, $field_name, $type, $alt = '') { /** * Retrieves the fid of the last inserted file. */ - function getLastFileId() { + protected function getLastFileId() { return (int) db_query('SELECT MAX(fid) FROM {file_managed}')->fetchField(); } + } diff --git a/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php b/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php index cffbf69..e8d2f2a 100644 --- a/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php +++ b/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php @@ -7,7 +7,6 @@ namespace Drupal\image\Tests; -use Drupal\field\Entity\FieldConfig; use Drupal\file\Entity\File; /**