function field_attach_presave


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

Perform necessary operations just before fields data get saved.

We take no specific action here, we just give other modules the opportunity to act.


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

$entity: The entity with fields to process.

Related topics

12 calls to field_attach_presave()
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
field_test_entity_save in modules/field/tests/
Saves a test_entity.
file_entity_file_presave in sites/all/modules/ulmus/file_entity/
Implements hook_file_presave().
LTIToolProviderConsumerEntityController::save in sites/all/modules/ulmus/lti_tool_provider/LTIToolProviderConsumerEntityController.class.php
Save a consumer.
LTIToolProviderMembershipsContextEntityController::save in sites/all/modules/ulmus/lti_tool_provider/lti_tool_provider_memberships/LTIToolProviderMembershipsContextEntityController.class.php
Save a memberships context entity.

... See full list


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


function field_attach_presave($entity_type, $entity) {
  _field_invoke('presave', $entity_type, $entity);

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



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.