Problem/Motivation
The extra fields are not being cloned correctly, they are not located in their correct regions (content, hidden).
Steps to reproduce
- Create extra fields with the hook, hook_entity_extra_field_info for NodeType in form display.
- Mark the extra fields visible=FALSE.
- Set visibility to visible throughth of UI.
- Clone the entity entity type.
- Check out the extra fields must be visible (content) and appear hidden (hidden).
$extra['node'][$bundle->id()]['display']['my_extra_field'] = [
'label' => t('Extra field label'),
'visible' => FALSE,
'weight' => 5,
];
Proposed resolution
Adjust, create MR or patch.
Comments
Comment #2
dmezquiaComment #3
dmezquiaComment #7
dmezquiaComment #8
dmezquiaWhat the MR does is to initially set the extra fields of the source entity in the destination entity, maintaining the same order of the source and the same location.
Patch: https://git.drupalcode.org/project/entity_type_clone/-/merge_requests/10...
Comment #9
vuilComment #10
vuilComment #11
vuilComment #13
vuil