diff --git a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php index c1bd594..2903539 100644 --- a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php +++ b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php @@ -238,13 +238,6 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $ * {@inheritdoc} */ public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) { - $all_views = $this->entityManager->getStorage('view')->loadMultiple(NULL); - - $this->removeFieldStorage($all_views, $storage_definition->getTargetEntityTypeId(), $storage_definition->getName()); - - foreach ($all_views as $view) { - $view->save(); - } } /** @@ -381,25 +374,6 @@ protected function dataTableRemoval($all_views, $entity_type_id, $old_data_table } /** - * Updates views if a field is removed. - * - * @param \Drupal\views\Entity\View[] $all_views - * All views. - * @param string $entity_type_id - * The entity type ID. - * @param string $field_name - * The name of the removed field. - */ - protected function removeFieldStorage($all_views, $entity_type_id, $field_name) { - $this->processHandlers($all_views, function (array &$handler_config) use ($entity_type_id, $field_name) { - // If the removed field matches, remove the handler configuration. - if (isset($handler_config['entity_type']) && isset($handler_config['entity_field']) && $handler_config['entity_type'] == $entity_type_id && $handler_config['entity_field'] == $field_name) { - $handler_config = NULL; - } - }); - } - - /** * Updates views if revision support is removed * * @param \Drupal\views\Entity\View[] $all_views