- Issue created by @devanbicher
Cloning external entities using entity clone β is not fully supported when an external entity has fields.
I created issue 3415100 β¨ Add support for External Entities (with Fields) Active , within entity clone that adds a patch to the module to allow for cloning external entities.
Here is the text about the problem, copied from the issue:
Because of differences in the implementation of
external entities β
compared to other fielded entity types the default behavior in src/EntityClone/Config/ConfigWithFieldEntityClone.php
cloned an external entity, but did not add any of the additional fields.
The primary discrepancy lies in the fact that different external entity types are not bundles of type external entity, but instead each external entity is it's own type. Meaning bundle and type are the same. So in ConfigWithFieldEntityClone, $cloned_entity->getEntityType()->getBundleOf()
returned null
.
As a result of this behavior, field definitions don't re-use field storage, so for each new external entity that is cloned the field storage definitions must be cloned along with the field definitions. Similarly view and form displays don't follow the same naming convention as other entities.
There is no work to be done in this module. I've linked to the other issue to give visibility for the patch and issue over in entity clone, in case anyone here using this module also wanted to leverage cloning via entity clone.
Active
Code