Sfoglia il codice sorgente

temporary fix for the no site selected error of BE customizer

Olivier Massot 4 anni fa
parent
commit
18d24d03a6
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  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();