function field_purge_data


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field_purge_data($entity_type, $entity, $field, $instance)
cle7 field_purge_data($entity_type, $entity, $field, $instance)
elmsmedia7 field_purge_data($entity_type, $entity, $field, $instance)
icor7 field_purge_data($entity_type, $entity, $field, $instance)
meedjum_blog7 field_purge_data($entity_type, $entity, $field, $instance)
mooc7 field_purge_data($entity_type, $entity, $field, $instance)

Purges the field data for a single field on a single pseudo-entity.

This is basically the same as field_attach_delete() except it only applies to a single field. The entity itself is not being deleted, and it is quite possible that other field data will remain attached to it.


$entity_type: The type of $entity; e.g. 'node' or 'user'.

$entity: The pseudo-entity whose field data is being purged.

$field: The (possibly deleted) field whose data is being purged.

$instance: The deleted field instance whose data is being purged.

Related topics

1 call to field_purge_data()
field_purge_batch in modules/field/
Purges a batch of deleted Field API data, instances, or fields.


modules/field/, line 938
Field CRUD API, handling field and field instance creation and deletion.


function field_purge_data($entity_type, $entity, $field, $instance) {
  // Each field type's hook_field_delete() only expects to operate on a single
  // field at a time, so we can use it as-is for purging.
  $options = array(
    'field_id' => $instance['field_id'],
    'deleted' => TRUE,
  _field_invoke('delete', $entity_type, $entity, $dummy, $dummy, $options);

  // Tell the field storage system to purge the data.
  module_invoke($field['storage']['module'], 'field_storage_purge', $entity_type, $entity, $field, $instance);

  // Let other modules act on purging the data.
  foreach (module_implements('field_attach_purge') as $module) {
    $function = $module . '_field_attach_purge';
    $function($entity_type, $entity, $field, $instance);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.