core/modules/editor/editor.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index c8d5e33..e3ff99c 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -403,8 +403,10 @@ function editor_entity_update(EntityInterface $entity) { // On new revisions, all files are considered to be a new usage and no // deletion of previous file usages are necessary. if (!empty($entity->original) && $entity->getRevisionId() != $entity->original->getRevisionId()) { - $referenced_files = _editor_get_file_uuids_by_field($entity); - _editor_record_file_usage($referenced_files, $entity); + $referenced_files_by_field = _editor_get_file_uuids_by_field($entity); + foreach ($referenced_files_by_field as $field => $uuids) { + _editor_record_file_usage($uuids, $entity); + } } // On modified revisions, detect which file references have been added (and // record their usage) and which ones have been removed (delete their usage).