diff --git a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php index 2dd4652..56b2001 100644 --- a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php +++ b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php @@ -27,6 +27,13 @@ public function getCacheContexts() { */ public function build() { $output = $this->view->display_handler->viewExposedFormBlocks(); + // Provide the context for render array. + if (is_array($output) && !empty($output)) { + $output += [ + '#view' => $this->view, + '#display_id' => $this->displayID, + ]; + } // Before returning the block output, convert it to a renderable array with // contextual links.