--- feeds.module 2010-10-28 15:58:22.000000000 -0400 +++ feeds.module 2011-01-19 17:30:31.000000000 -0500 @@ -317,7 +317,6 @@ function feeds_feeds_plugins() { * 'validate' and 'update'/'insert'. */ function feeds_nodeapi(&$node, $op, $form) { - // $node looses any changes after 'validate' stage (see node_form_validate()). // Keep a copy of title and feeds array between 'validate' and subsequent // stages. This allows for automatically populating the title of the node form @@ -331,6 +330,11 @@ function feeds_nodeapi(&$node, $op, $for if ($importer_id = feeds_get_importer_id($node->type)) { switch ($op) { + case 'prepare': + $source = feeds_source($importer_id, empty($node->nid) ? 0 : $node->nid); + $node->feeds=array(); + $node->feeds += $source->configDefaults(); + break; case 'validate': // On validation stage we are working with a FeedsSource object that is // not tied to a nid - when creating a new node there is no @@ -588,6 +592,7 @@ function feeds_get_importer_id($content_ return isset($importers[$content_type]) ? $importers[$content_type] : FALSE; } + /** * Helper function for feeds_get_importer_id() and feeds_enabled_importers(). */