Jelajahi Sumber

temporary fix for the no site selected error of BE customizer

Olivier Massot 4 tahun lalu
induk
melakukan
18d24d03a6
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      ot_core/Classes/Controller/SelectedSiteController.php

+ 4 - 1
ot_core/Classes/Controller/SelectedSiteController.php

@@ -40,6 +40,7 @@ class SelectedSiteController extends ActionController
      *
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
      * @throws \Opentalent\OtCore\Exception\NoSuchWebsiteException
+     * @throws \Exception
      */
     protected function callActionMethod() {
 
@@ -72,7 +73,9 @@ class SelectedSiteController extends ActionController
 
         // No site is selected, redirect to the warning page
         if ($this->actionMethodName != 'displayNoSelectedPageWarningAction' && $this->currentRootUid == null) {
-            $this->forward('displayNoSelectedPageWarning', 'SelectedSite', 'OtCore');
+            throw new \Exception("No website selected");
+            // forward does not work correctly when called from another extension...
+            // $this->forward('displayNoSelectedPageWarning', 'SelectedSite', 'OtCore');
         }
 
         parent::callActionMethod();