Skip to content
Snippets Groups Projects
Commit 436fc4f8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #520620 by quicksketch: delete revision and prepare translation field...

- Patch #520620 by quicksketch: delete revision and prepare translation field hooks are called incorrectly (or not at all).
parent 9c8c3cfd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -727,7 +727,7 @@ function field_attach_delete($obj_type, $object) {
* The object with fields to save.
*/
function field_attach_delete_revision($obj_type, $object) {
_field_invoke('delete revision', $obj_type, $object);
_field_invoke('delete_revision', $obj_type, $object);
module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_delete_revision', $obj_type, $object);
// Let other modules act on deleting the revision.
......@@ -904,8 +904,8 @@ function field_attach_prepare_translation($node) {
$type = content_types($node->type);
// Save cycles if the type has no fields.
if (!empty($type['instances'])) {
$default_additions = _field_invoke_default('prepare translation', $node);
$additions = _field_invoke('prepare translation', $node);
$default_additions = _field_invoke_default('prepare_translation', $node);
$additions = _field_invoke('prepare_translation', $node);
// Merge module additions after the default ones to enable overriding
// of field values.
$node = (object) array_merge((array) $node, $default_additions, $additions);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment