- Issue created by @guardiola86
In the function processEntityBrowserSelected, on this condition:
if ($entity_type_manager->hasHandler($entity_type_id, 'view_builder')) {
$preview = $entity_type_manager->getViewBuilder($entity_type_id)->view($entity, $element['#view_mode']);
}
else {
$preview = ['#markup' => $entity->label()];
}
It's entering on the first if. The problem is that as far as I know, files don't have view modes (or at least I can't configure them for files in admin/structure/display-modes/view), so there should be an extra condition so it would enter instead inside the else.
Active
1.0
Code