? MISC-FIELD-CHANGES-REAPPLY.patch
? Makefile
? d6-50-nodes.sql.gz
? d7-50-nodes-new.sql.gz
? d7-50-nodes.sql.gz
? head.kpf
? patches
? scripts/OLD-generate-autoload.pl
? scripts/generate-autoload.pl
? sites/all/cck
? sites/all/modules/color
? sites/all/modules/combofield
? sites/all/modules/devel
? sites/all/modules/pbs
? sites/all/modules/taint
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/field/field.attach.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v
retrieving revision 1.86
diff -u -F '^[fc]' -r1.86 field.attach.inc
--- modules/field/field.attach.inc	4 Apr 2010 12:48:18 -0000	1.86
+++ modules/field/field.attach.inc	22 Apr 2010 22:30:02 -0000
@@ -1056,7 +1056,7 @@ function field_attach_delete_revision($e
  * @param $conditions
  *   An array of query conditions. Each condition is a numerically indexed
  *   array, in the form: array(column, value, operator).
- *   Not all storage engines are required to support queries on all column, or
+ *   Not all storage engines are required to support queries on all columns, or
  *   with all operators below. A FieldQueryException will be raised if an
  *   unsupported condition is specified.
  *   Supported columns:
Index: modules/field/modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.53
diff -u -F '^[fc]' -r1.53 text.module
--- modules/field/modules/text/text.module	13 Apr 2010 15:16:27 -0000	1.53
+++ modules/field/modules/text/text.module	22 Apr 2010 22:30:02 -0000
@@ -590,3 +590,24 @@ function text_field_widget_error($elemen
   form_error($error_element, $error['message']);
 }
 
+/**
+ * Implements hook_filter_format_update().
+ *
+ * When a text format is updated, invalidate the field data cache. We
+ * could try to be more clever and only invalid selected cache
+ * elements, but input formats are not deleted that often.
+ */
+function text_filter_format_update($format) {
+  field_cache_clear();
+}
+
+/**
+ * Implements hook_filter_format_delete().
+ *
+ * When a text format is deleted, invalidate the field data cache. We
+ * could try to be more clever and only invalid selected cache
+ * elements, but input formats are not deleted that often.
+ */
+function text_filter_format_delete($format, $fallback) {
+  field_cache_clear();
+}
Index: modules/field/modules/text/text.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.test,v
retrieving revision 1.22
diff -u -F '^[fc]' -r1.22 text.test
--- modules/field/modules/text/text.test	10 Apr 2010 10:01:15 -0000	1.22
+++ modules/field/modules/text/text.test	22 Apr 2010 22:30:02 -0000
@@ -216,6 +216,14 @@ class TextFieldTestCase extends DrupalWe
     $entity->content = field_attach_view($entity_type, $entity);
     $this->content = drupal_render($entity->content);
     $this->assertRaw($value, t('Value is displayed unfiltered'));
+
+    // Delete the text format and verify the field content renders in
+    // plain text.
+    filter_format_delete(filter_format_load($format_id));
+    $entity = field_test_entity_test_load($id);
+    $entity->content = field_attach_view($entity_type, $entity);
+    $this->content = drupal_render($entity->content);
+    $this->assertRaw(check_plain($value), t('Value is displayed in plain text when text format is deleted'));
   }
 }
 
