diff --git a/core/lib/Drupal/Core/Render/Element/RenderElement.php b/core/lib/Drupal/Core/Render/Element/RenderElement.php index 239916b..5579483 100644 --- a/core/lib/Drupal/Core/Render/Element/RenderElement.php +++ b/core/lib/Drupal/Core/Render/Element/RenderElement.php @@ -171,7 +171,7 @@ public static function preRenderAjaxForm($element) { // If #ajax is TRUE, convert it to an empty array. Depending on the #type, // it will still be given an event. - if (!is_array($element['#ajax'])) { + if ($element['#ajax'] === TRUE) { $element['#ajax'] = []; } diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index 074e612..2e3400e 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -545,6 +545,8 @@ public function renderPreview($display_id, $args = array()) { $executable = $this->getExecutable(); /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = \Drupal::service('renderer'); + /** @var \Drupal\Core\Render\RenderCacheInterface $render_cache */ + $render_cache = \Drupal::service('render_cache'); // Determine where the query and performance statistics should be output. $config = \Drupal::config('views.settings'); @@ -857,8 +859,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. - $renderer->render($output['preview']); - $output['preview']['#printed'] = FALSE; + $renderer->renderPlain($output['preview']); + $output['preview'] = $render_cache->getCacheableRenderArray($output['preview']); } // Ensure that we just remove an additional request we pushed earlier.