Index: skeleton_template.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skeleton/skeleton_template.inc,v
retrieving revision 1.14
diff -u -r1.14 skeleton_template.inc
--- skeleton_template.inc	12 Mar 2009 18:22:29 -0000	1.14
+++ skeleton_template.inc	31 Mar 2009 00:02:44 -0000
@@ -293,11 +293,22 @@
     '#value' => _skeleton_build_token_help('node'),
   );
 
-  // unset the values we don't want or cannot save
-  $unset = array('parent', 'weight', 'menu', 'book', 'path', 'attachments', 'field_file', 'revision_information', 'log', 'buttons', '#submit');
+  // Unset the values we don't want or cannot save.
+  $unset = array('parent', 'weight', 'menu', 'book', 'path', 'attachments', 'revision_information', 'log', 'buttons', '#submit');
+
+  // Saving Filefield (or Imagefield) fields as is really breaks things, so
+  // find any such fields and remove them.
+  $content_type = content_types($node['type']);
+  $file_fields = array();
+  foreach ($content_type['fields'] as $data) {
+    if ($data['type'] == 'filefield') {
+      $unset[] = $data['field_name'];
+    }
+  }
   foreach ($unset as $item) {
     unset($form[$item]);
   }
+
   if (module_exists('nodeaccess') && user_access('grant node permissions')) {
     $form['skeleton_template_grants'] = array(
       '#type' => 'fieldset',
