diff --git a/core/modules/views/src/Plugin/views/display/Feed.php b/core/modules/views/src/Plugin/views/display/Feed.php index c558b89..dbc49e2 100644 --- a/core/modules/views/src/Plugin/views/display/Feed.php +++ b/core/modules/views/src/Plugin/views/display/Feed.php @@ -258,10 +258,6 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { * {@inheritdoc} */ public function attachTo(ViewExecutable $clone, $display_id, array &$build) { - // Disabled feed attachments do not attach. - if (!$this->isEnabled()) { - return; - } $displays = $this->getOption('displays'); if (empty($displays[$display_id])) { diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 9791a88..7f2a24a 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -1537,8 +1537,11 @@ public function attachDisplays() { $this->is_attachment = TRUE; // Find out which other displays attach to the current one. foreach ($this->display_handler->getAttachedDisplays() as $id) { + $display_handler = $this->displayHandlers->get($id); + if ($display_handler->isEnabled()) { $cloned_view = Views::executableFactory()->get($this->storage); - $this->displayHandlers->get($id)->attachTo($cloned_view, $this->current_display, $this->element); + $display_handler->attachTo($cloned_view, $this->current_display, $this->element); + } } $this->is_attachment = FALSE; } diff --git a/core/modules/views/src/Plugin/views/display/Feed.php b/core/modules/views/src/Plugin/views/display/Feed.php index dbc49e2..67171ab 100644 --- a/core/modules/views/src/Plugin/views/display/Feed.php +++ b/core/modules/views/src/Plugin/views/display/Feed.php @@ -258,7 +258,6 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { * {@inheritdoc} */ public function attachTo(ViewExecutable $clone, $display_id, array &$build) { - $displays = $this->getOption('displays'); if (empty($displays[$display_id])) { return; diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 7f2a24a..23c4f4f 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -1538,6 +1538,7 @@ public function attachDisplays() { // Find out which other displays attach to the current one. foreach ($this->display_handler->getAttachedDisplays() as $id) { $display_handler = $this->displayHandlers->get($id); + // Only attach enable attachments. if ($display_handler->isEnabled()) { $cloned_view = Views::executableFactory()->get($this->storage); $display_handler->attachTo($cloned_view, $this->current_display, $this->element);