diff --git a/eck.entity.inc b/eck.entity.inc index 964461e..9af8abf 100755 --- a/eck.entity.inc +++ b/eck.entity.inc @@ -425,8 +425,6 @@ function eck__entity__form_validate($form, &$state) { function eck__entity__form_submit($form, &$state) { $entity = $state['values']['entity']; - field_attach_submit($entity->entityType(), $entity, $form, $state); - $entity_type = $entity->entityType(); $entity_type = EntityType::loadByName($entity_type); $properties = $entity_type->properties; @@ -469,6 +467,8 @@ function eck__entity__form_submit($form, &$state) { $wrapper->{$property}->set($value); } + field_attach_submit($entity->entityType(), $entity, $form, $state); + // Let the behaviors modify the entity. // @todo Why do we need to pass form information to the save behavior. // This is related to eck_revisions. Is there a danger that the current