for my content type I have this computed field code and when I update existing node everything is ok, but when I create new node, menu_get_object return empty values and drupal display this error message "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7562 of /var/www/dev/testpage/includes/common.inc)." and nothing was saved. When I used dpm() in devel it show me that after creating new content $node is empty, but when I update node created before everything is OK.
$node = menu_get_object(); $start_time = field_get_items('node', $node, 'field_start_time'); $start_time = $start_time['value']; $entity_field['value'] = '$start_time';
thanks a lot for your reply