diff --git a/src/Publisher.php b/src/Publisher.php index 2f37e0c..e3cfa04 100644 --- a/src/Publisher.php +++ b/src/Publisher.php @@ -175,11 +175,11 @@ protected function generatePHPCacheFile($response) */ protected function generateHTMLCacheRedirection($destination) { - return SSViewer::execute_template( - 'SilverStripe\\StaticPublishQueue\\HTMLRedirection', - ArrayData::create([ - 'URL' => DBField::create_field('Varchar', $destination), - ]) - ); + $viewer = SSViewer::create('SilverStripe\\StaticPublishQueue\\HTMLRedirection'); + $viewer->setRewriteHashLinks(false); + $viewer->includeRequirements(false); + return $viewer->process(ArrayData::create([ + 'URL' => DBField::create_field('Varchar', $destination), + ])); } } diff --git a/tests/php/Publisher/FilesystemPublisherTest.php b/tests/php/Publisher/FilesystemPublisherTest.php index 734ba03..e6d0827 100644 --- a/tests/php/Publisher/FilesystemPublisherTest.php +++ b/tests/php/Publisher/FilesystemPublisherTest.php @@ -140,7 +140,7 @@ public function testUrlToPathWithDomainBasedCaching(): void public function testMenu2LinkingMode(): void { - SSViewer::set_themes(null); + SSViewer::set_themes([]); $reflection = new \ReflectionClass(FilesystemPublisher::class); $urlToPath = $reflection->getMethod('URLtoPath');