--- a/modules/field_layout/src/FieldLayoutBuilder.php +++ b/modules/field_layout/src/FieldLayoutBuilder.php @@ -106,7 +106,7 @@ class FieldLayoutBuilder implements ContainerInjectionInterface { // avoids breaking hook_form_alter() implementations by not actually // moving the field in the form structure. If a #group is already set, // do not overwrite it. - if (isset($regions[$field['region']]) && !isset($build[$name]['#group'])) { + if (isset($field['region']) && isset($regions[$field['region']]) && !isset($build[$name]['#group'])) { if (!empty($build['#parents'])) { $build[$name]['#group'] = implode('][', array_merge($build['#parents'], ['_field_layout', $field['region']])); }