diff --git a/core/modules/views/src/Plugin/views/field/Field.php b/core/modules/views/src/Plugin/views/field/Field.php index af3dad1..8ec9ebd 100644 --- a/core/modules/views/src/Plugin/views/field/Field.php +++ b/core/modules/views/src/Plugin/views/field/Field.php @@ -1007,10 +1007,13 @@ protected function getTableMapping() { */ public function getValue(ResultRow $values, $field = NULL) { $entity = $this->getEntity($values); + // Retrieve the translated object. + $translated_entity = $this->getEntityFieldRenderer()->getEntityTranslation($entity, $values); + // Some bundles might not have a specific field, in which case the entity // (potentially a fake one) doesn't have it either. /** @var \Drupal\Core\Field\FieldItemListInterface $field_item_list */ - $field_item_list = isset($entity->{$this->definition['field_name']}) ? $entity->{$this->definition['field_name']} : NULL; + $field_item_list = isset($translated_entity->{$this->definition['field_name']}) ? $translated_entity->{$this->definition['field_name']} : NULL; if (!isset($field_item_list)) { // There isn't anything we can do without a valid field. diff --git a/core/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php b/core/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php index fc4e07b..ee713a5 100644 --- a/core/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php +++ b/core/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php @@ -10,7 +10,10 @@ use Drupal\Core\Database\Query\SelectInterface; /** - * Implementation for the field_or_language join. + * Implementation for the "field OR language" join. + * + * If the extra conditions contain either .langcode or .bundle, + * they will be grouped and joined with OR. * * @ingroup views_join_handlers *