Pārlūkot izejas kodu

silent the current template error, just to allow typo3 to handle it

Olivier Massot 5 gadi atpakaļ
vecāks
revīzija
947b0db07c
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      ot_templating/Classes/Page/OtPageRepository.php

+ 2 - 1
ot_templating/Classes/Page/OtPageRepository.php

@@ -94,7 +94,8 @@ class OtPageRepository extends PageRepository
     public function getCurrentTemplate() {
         $rootPageUid = $this->getCurrentSiteRootPageId();
         if (!($rootPageUid >= 0)) {
-            throw new \RuntimeException('Can not find any root page');
+//            throw new \RuntimeException('Can not find any root page');
+            return self::defaultTemplate;
         }
 
         $rootPage = $this->getPage($rootPageUid);