diff -u b/core/modules/image/css/editors/image.theme.css b/core/modules/image/css/editors/image.theme.css --- b/core/modules/image/css/editors/image.theme.css +++ b/core/modules/image/css/editors/image.theme.css @@ -73,13 +73,22 @@ } .quickedit-image-field-info div { - margin-right: 10px; + margin-right: 10px; /* LTR */ } .quickedit-image-field-info div:last-child { + margin-right: 0; /* LTR */ +} + +[dir="rtl"] .quickedit-image-field-info div { + margin-left: 10px; margin-right: 0; } +[dir="rtl"] .quickedit-image-field-info div:last-child { + margin-left: 0; +} + .quickedit-image-errors .messages__wrapper { margin: 0; padding: 0; diff -u b/core/modules/image/src/Controller/QuickEditImageController.php b/core/modules/image/src/Controller/QuickEditImageController.php --- b/core/modules/image/src/Controller/QuickEditImageController.php +++ b/core/modules/image/src/Controller/QuickEditImageController.php @@ -116,7 +116,7 @@ // Render the new image using the correct formatter settings. $entity_view_mode_ids = array_keys($this->entityManager()->getViewModes($entity->getEntityTypeId())); - if (in_array($view_mode_id, $entity_view_mode_ids)) { + if (in_array($view_mode_id, $entity_view_mode_ids, TRUE)) { $output = $entity->$field_name->view($view_mode_id); } else { @@ -200,7 +200,7 @@ // Check that this field exists. /** @var \Drupal\Core\Field\FieldItemListInterface $field_list */ - $field_list = $entity->getTranslation($langcode)->$field_name; + $field_list = $entity->getTranslation($langcode)->get($field_name); if (!$field_list) { throw new BadRequestHttpException('Requested Field does not exist.'); } @@ -211,7 +211,7 @@ } // Otherwise, use the first item. else { - $field = $entity->getTranslation($langcode)->$field_name->get(0); + $field = $entity->getTranslation($langcode)->get($field_name)->first(); } // Ensure that the field is the type we expect.