function field_attach_delete


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_attach_delete($entity_type, $entity)
cle7 field_attach_delete($entity_type, $entity)
elmsmedia7 field_attach_delete($entity_type, $entity)
icor7 field_attach_delete($entity_type, $entity)
meedjum_blog7 field_attach_delete($entity_type, $entity)
mooc7 field_attach_delete($entity_type, $entity)

Delete field data for an existing entity. This deletes all revisions of field data for the entity.


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

$entity: The entity whose field data to delete.

Related topics

11 calls to field_attach_delete()
accessibility_test_delete_multiple in sites/all/modules/ulmus/accessibility/accessibility.module
Delete multiple accessibility tests.
comment_delete_multiple in modules/comment/comment.module
Delete comments and all their replies.
file_entity_file_delete in sites/all/modules/ulmus/file_entity/
Implements hook_file_delete().
LTIToolProviderConsumerEntityController::deleteMultiple in sites/all/modules/ulmus/lti_tool_provider/LTIToolProviderConsumerEntityController.class.php
Delete multiple consumers.
LTIToolProviderMembershipsContextEntityController::delete_multiple in sites/all/modules/ulmus/lti_tool_provider/lti_tool_provider_memberships/LTIToolProviderMembershipsContextEntityController.class.php
Delete a list of memberships context entities.

... See full list


modules/field/, line 1045
Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.


function field_attach_delete($entity_type, $entity) {
  _field_invoke('delete', $entity_type, $entity);

  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);

  // Collect the storage backends used by the fields in the entities.
  $storages = array();
  foreach (field_info_instances($entity_type, $bundle) as $instance) {
    $field = field_info_field_by_id($instance['field_id']);
    $field_id = $field['id'];
    $storages[$field['storage']['type']][$field_id] = $field_id;

  // Field storage backends delete their data.
  foreach ($storages as $storage => $fields) {
    $storage_info = field_info_storage_types($storage);
    module_invoke($storage_info['module'], 'field_storage_delete', $entity_type, $entity, $fields);

  // Let other modules act on deleting the entity.
  module_invoke_all('field_attach_delete', $entity_type, $entity);

  $entity_info = entity_get_info($entity_type);
  if ($entity_info['field cache']) {
    cache_clear_all("field:$entity_type:$id", 'cache_field');



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.