Olivier Massot vor 4 Jahren
Ursprung
Commit
edbd4d96a1

+ 1 - 1
ot_core/Classes/Website/OtPageRepository.php

@@ -81,7 +81,7 @@ class OtPageRepository
         for (end($rootLine); key($rootLine)!==null; prev($rootLine)){
         for (end($rootLine); key($rootLine)!==null; prev($rootLine)){
             $page = current($rootLine);
             $page = current($rootLine);
             if ($page['is_siteroot'] == 1) {
             if ($page['is_siteroot'] == 1) {
-                $page = $this->pageRepository->getPage($page['uid']);
+                $page = $this->pageRepository->getPage($page['uid'], true);
                 return $page;
                 return $page;
             }
             }
         }
         }

+ 1 - 0
ot_core/Classes/Website/OtWebsiteRepository.php

@@ -123,6 +123,7 @@ class OtWebsiteRepository
      * @param int $websiteUid
      * @param int $websiteUid
      * @param bool $withRestrictions
      * @param bool $withRestrictions
      * @return int
      * @return int
+     * @throws NoSuchRecordException
      */
      */
     public function getWebsiteRootUid(int $websiteUid, bool $withRestrictions = true): int {
     public function getWebsiteRootUid(int $websiteUid, bool $withRestrictions = true): int {
         $queryBuilder = $this->connectionPool->getQueryBuilderForTable('pages');
         $queryBuilder = $this->connectionPool->getQueryBuilderForTable('pages');