diff -u b/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php --- b/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -558,45 +558,16 @@ - // Disable and log a message that the View was disabled if made changes and - // if we have resolved all dependencies. + // Disable the View if we made changes. // @todo https://www.drupal.org/node/2832558 Give better feedback for // disabled config. if ($changed) { - $disable = TRUE; - // If any of the dependencies still exist, the View will be deleted so - // there is no need to disable the View or log a message. + // Force a recalculation of the dependencies if we made changes. $this->getExecutable()->current_display = NULL; $this->calculateDependencies(); - $new_dependencies = $this->getDependencies(); - foreach ($dependencies as $group => $dependency_list) { - foreach ($dependency_list as $config_key) { - if (isset($new_dependencies[$group]) && array_key_exists($config_key, $new_dependencies[$group])) { - $disable = FALSE; - break 2; - } - } - } - if ($disable) { - $this->disable(); - $arguments = [ - '@id' => $this->id(), - ]; - $this->getLogger() - ->warning("View '@id': View was disabled because its settings depend on removed dependencies.", $arguments); - } + $this->disable(); } $this->getExecutable()->setDisplay($current_display); return $changed; } - /** - * Provides the 'system' channel logger service. - * - * @return \Psr\Log\LoggerInterface - * The 'system' channel logger. - */ - protected function getLogger() { - return \Drupal::logger('system'); - } - }