Skip to content

Commit

Permalink
VACMS-16827 Fix loading of alt text field definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
swirtSJW committed Jan 12, 2024
1 parent a2fb32a commit 22428ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public static function imageFieldWidgetProcess(array $element, FormStateInterfac
}

$delta = $element['#delta'];
$fieldDefinition = $entity->getFieldDefinition('image');
$fieldDefinition = $entity->getFieldDefinition($element['#field_name']);

$keys = [$element['#entity_type']];
$keys[] = $entity->id() ? $entity->id() : 0;
if (method_exists($fieldDefinition, 'id')) {
if (is_object($fieldDefinition) && method_exists($fieldDefinition, 'id')) {
$field_definition_id = str_replace('.', '--', $fieldDefinition->id());
}
else {
Expand Down

0 comments on commit 22428ab

Please sign in to comment.