Closed netcoop closed 4 years ago
Thanks a lot for this bugfix.
Well, I have now tried the bugfix, but I still get an error TYPO3\CMS\Core\Exception\SiteNotFoundException for pages with no siteroot. Any idea?
I have found a way. For me, it works only so:
try { $rootLineUtility = new \TYPO3\CMS\Core\Utility\RootlineUtility($row['pid']); $rootline = $rootLineUtility->get(); $root = array_pop($rootline); $row['root'] = $root['uid']; //$row['domain'] = $domains[$root['uid']]; if ($root['is_siteroot']) { $site = $siteFinder->getSiteByPageId($root['uid']); // oder $row['pid']); $base = $site->getConfiguration()['base']; $row['domain'] = rtrim($base, '/'); } else { $row['domain'] = ''; } } catch (SiteNotFoundException $e) { $row['domain'] = ''; }
If you have folders outside the site root pages containing content, or inconsistencies like lost pages whose parent has been deleted, then this fix catches the exception and backendtools keeps working.