Skip to content
Snippets Groups Projects
Commit a3cafc77 authored by Arthur Lorenz's avatar Arthur Lorenz Committed by Joachim Noreiko
Browse files

Issue #2849461 by arthur_lorenz: Fixed field config not getting updated on cloned fields.

parent 786fe503
No related branches found
Tags 7.x-2.6
No related merge requests found
......@@ -98,6 +98,11 @@ class FieldCloner {
$new_field_config = $field_config->createDuplicate();
if ($destination_entity_type_id != $field_config_target_entity_type_id) {
$new_field_config->set('entity_type', $destination_entity_type_id);
// Make the field use newly created storage.
if (isset($new_field_storage_config)) {
$new_field_config->set('fieldStorage', $new_field_storage_config);
}
}
$new_field_config->set('bundle', $destination_bundle);
$new_field_config->save();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment