Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views / src / Controller / ViewAjaxController.php
index c40cf857660712c67092cfb1d9c661b92cf3599f..d204766f28dba1801b6efc33c4d9024b6d45868f 100644 (file)
@@ -142,7 +142,7 @@ class ViewAjaxController implements ContainerInjectionInterface {
         throw new NotFoundHttpException();
       }
       $view = $this->executableFactory->get($entity);
         throw new NotFoundHttpException();
       }
       $view = $this->executableFactory->get($entity);
-      if ($view && $view->access($display_id)) {
+      if ($view && $view->access($display_id) && $view->setDisplay($display_id) && $view->display_handler->getOption('use_ajax')) {
         $response->setView($view);
         // Fix the current path for paging.
         if (!empty($path)) {
         $response->setView($view);
         // Fix the current path for paging.
         if (!empty($path)) {