diff --git a/core/modules/views/src/Plugin/views/style/Rss.php b/core/modules/views/src/Plugin/views/style/Rss.php index 8bfe130..60482b1 100644 --- a/core/modules/views/src/Plugin/views/style/Rss.php +++ b/core/modules/views/src/Plugin/views/style/Rss.php @@ -45,7 +45,7 @@ public function attachTo(array &$build, $display_id, $path, $title) { if ($display->hasPath()) { if (empty($this->preview)) { // Add a call for drupal_add_feed to the view attached data. - $this->view->element['#attached']['drupal_add_feed'][] = array($url, $title); + $build['#attached']['drupal_add_feed'][] = array($url, $title); } } else { diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 0c2538a..34f7500 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -1509,7 +1509,7 @@ public function attachDisplays() { // Create a clone for the attachments to manipulate. 'static' refers to the current class name. $cloned_view = new static($this->storage, $this->user); $cloned_view->setRequest($this->getRequest()); - $this->displayHandlers->get($id)->attachTo($cloned_view, $this->current_display); + $this->displayHandlers->get($id)->attachTo($cloned_view, $this->current_display, $this->element); } $this->is_attachment = FALSE; }