0

I am trying to create a entity with few bundles. I have used EntityDefaultUIController as admin UI callback. This provides me with few default functions such as clone, import and export. The problem is when I try to clone or export the entity. It does not export or clone the fields attached to it. Has anyone faced similar issues. I traced back the issue to entity_ui_get_form function which does not have any function related to getting the field information. How could I clone entity with its fields attached to it?

Kindly help me figure this out.

  • as I understand, more accurate title should be "How to clone an entity type...". As I understand, you would need to clone entity type, not entities (instances of entity type)? – tomas.teicher Aug 9 '16 at 9:02
1

A recent module called Replicate provides an API to easily clone any entity, including of course its fields and references.

| improve this answer | |
0

There is an issue open on drupal.org for cloning fields along with the entity. There's also an RTBC patch - see https://www.drupal.org/node/1513812. The patch to use is number 23 (https://www.drupal.org/node/1513812#comment-7800593).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.