Commit 97a9d70b authored by John C. Fiala's avatar John C. Fiala
Browse files

Issue #1290904 by gordon:Moved link processing on save from the...

Issue #1290904 by gordon:Moved link processing on save from the hook_field_presave link to the hook_field_insert/update hook to prevent problem with field_attach_update.
parent a1792d0a
......@@ -273,9 +273,18 @@ function link_field_validate($entity_type, $entity, $field, $instance, $langcode
}
/**
* Implements hook_field_presave().
* Implements hook_field_insert().
*/
function link_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
function link_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
foreach ($items as $delta => $value) {
_link_process($items[$delta], $delta, $field, $entity);
}
}
/**
* Implements hook_field_update().
*/
function link_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
foreach ($items as $delta => $value) {
_link_process($items[$delta], $delta, $field, $entity);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment