diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 491447bb6..fe4d11822 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -12,6 +12,7 @@ use Drupal\views\Plugin\DependentWithRemovalPluginInterface; use Drupal\views\Views; use Drupal\views\ViewEntityInterface; +use Drupal\Component\Plugin\PluginInspectionInterface; /** * Defines a View configuration entity class. @@ -281,7 +282,9 @@ public function calculateDependencies() { foreach ($executable->displayHandlers as $display) { // Calculate the dependencies each display has. - $this->calculatePluginDependencies($display); + if ($display instanceof PluginInspectionInterface) { + $this->calculatePluginDependencies($display); + } } return $this;