I kind of expected to see the same fields as the original profile type in my clone, but maybe I'm missing something. What's the idea behind cloning if the clone starts with an empty profile type? I might as well create a new one from scratch, right?

Comments

fago’s picture

Title: Cloning does not clone the fields » UI: Cloning does not clone the fields
Project: Profile 2 » Entity API
Component: Code » Entity CRUD API - UI
Category: support » bug

Makes sense to me, I guess it needs to be fixed generically in the Entity API though.

klausi’s picture

Project: Entity API » Profile 2
Component: Entity CRUD API - UI » Code

Meh, handling that generically with the Entity API or the Entity UI seems to be complicated and error-prone. Entity providing modules should care about cloning themselves when they have properties (e.g. fields) that are not part of the entity object itself.

metakel’s picture

Not only the clone function does not work, but also the export function.

The exported code of my lot-of-field profile only includes:

{
  "userCategory" : true,
  "userView" : true,
  "type" : "mentor",
  "label" : "Mentor",
  "weight" : "0",
  "data" : { "registration" : 0, "use_page" : 0 },
  "rdf_mapping" : []
}
Ingmar’s picture

Any update on this? Just ran into this problem as well.

fago’s picture

Status: Active » Closed (duplicate)

Let's handle this in http://drupal.org/node/1317446

geek-merlin’s picture

Status: Closed (duplicate) » Postponed

hmm, the code over there at #1317446: Cloning a profile type doesn't copy the fields suggests this should be supported generically.

but setting to postponed, feel free to change.

also crosslinking #1342590: node_clone -> entity_clone