Skip to content

Commit

Permalink
fix: get site in document model
Browse files Browse the repository at this point in the history
  • Loading branch information
runepiper committed Jan 20, 2025
1 parent e2e67d0 commit ed852ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static function createFromTSFE(TypoScriptFrontendController $tsfe): Docum

$document = new Document();
$document->setId(md5($url));
$document->setRootPageId($tsfe->getSite()->getRootPageId() ?? 0);
$document->setRootPageId($GLOBALS['TYPO3_REQUEST']->getAttribute('site')->getRootPageId() ?? 0);
$document->setContent(implode(PHP_EOL, $content ?? []));
$document->setType('page');
$document->setTitle($tsfe->page['title'] ?? '');
Expand Down

0 comments on commit ed852ed

Please sign in to comment.