diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index ac791d8..074e612 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -857,11 +857,8 @@ public function renderPreview($display_id, $args = array()) { // We render the preview now, in order to render it in the context of the // previous setup request, because for example pager links depend on the // "current" URL. - $elements = $output['preview']; - $output['preview'] = [ - '#markup' => $renderer->renderPlain($elements), - ]; - BubbleableMetadata::createFromRenderArray($elements)->applyTo($output['preview']); + $renderer->render($output['preview']); + $output['preview']['#printed'] = FALSE; } // Ensure that we just remove an additional request we pushed earlier.