Skip to content
Snippets Groups Projects

Issue #3353406: Check entity field really is translatable

1 file
+ 1
2
Compare changes
  • Side-by-side
  • Inline
@@ -216,8 +216,7 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
// Get the raw field value only if suggestion or dropdown item is in RAW format.
if ($use_raw_suggestion || $use_raw_dropdown) {
$langcode = \Drupal::languageManager()->getCurrentLanguage()->getId();
$entity = $view->result[$index]->_entity->getTranslation($langcode);
$raw_field = $entity->$field_name->value;
$raw_field = $style_plugin->getFieldValue($index, $field_name);
if (!is_array($raw_field)) {
$raw_field = [['value' => $raw_field]];
}
Loading