Commit 862d94ab authored by Nilanjan Ray's avatar Nilanjan Ray Committed by renatog
Browse files

Issue #2634574 by roynilanjan, Siavash, helmo, RenatoG: Delete old revisions...

Issue #2634574 by roynilanjan, Siavash, helmo, RenatoG: Delete old revisions then lost field collection data which is add by in old revision
parent 07054383
Loading
Loading
Loading
Loading
+5 −0
Changes for field_collection.module: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -614,6 +614,11 @@ function field_collection_field_update($host_entity_type, $host_entity, $field,
          }
        }

        // According to work-around https://www.drupal.org/node/1031010#comment-8708493
        // when delete old revisions then lost field collection data which is
        // add by in old revision, you only get that data which you add as add
        // an other item with your published copy.
        $entity->item_id = NULL;
        if (!empty($entity->is_new)) {
          $entity->setHostEntity($host_entity_type, $host_entity, $langcode, FALSE);
        }