diff --git a/core/modules/field/field.purge.inc b/core/modules/field/field.purge.inc index ae3e26694f..9fa8a70c41 100644 --- a/core/modules/field/field.purge.inc +++ b/core/modules/field/field.purge.inc @@ -85,14 +85,6 @@ function field_purge_batch($batch_size, $field_storage_uuid = NULL) { $info = \Drupal::entityManager()->getDefinitions(); foreach ($fields as $field) { $entity_type = $field->getTargetEntityTypeId(); - - // We cannot purge anything if the entity type is unknown (e.g. the - // providing module was uninstalled). - // @todo Revisit after https://www.drupal.org/node/2080823. - if (!isset($info[$entity_type])) { - continue; - } - $count_purged = \Drupal::entityManager()->getStorage($entity_type)->purgeFieldData($field, $batch_size); if ($count_purged < $batch_size || $count_purged == 0) { // No field data remains for the field, so we can remove it. @@ -113,14 +105,6 @@ function field_purge_batch($batch_size, $field_storage_uuid = NULL) { // If a specific UUID is provided, only purge the corresponding field. continue; } - - // We cannot purge anything if the entity type is unknown (e.g. the - // providing module was uninstalled). - // @todo Revisit after https://www.drupal.org/node/2080823. - if (!isset($info[$field_storage->getTargetEntityTypeId()])) { - continue; - } - $fields = entity_load_multiple_by_properties('field_config', array('field_storage_uuid' => $field_storage->uuid(), 'include_deleted' => TRUE)); if (empty($fields)) { field_purge_field_storage($field_storage);