diff --git a/src/ErrorPage.php b/src/ErrorPage.php index 7302c43..e35efb6 100644 --- a/src/ErrorPage.php +++ b/src/ErrorPage.php @@ -322,6 +322,7 @@ public function writeStaticPage() // Run the page (reset the theme, it might've been disabled by LeftAndMain::init()) $originalThemes = SSViewer::get_themes(); try { + $this->extend('onBeforeStaticWrite'); // Restore front-end themes from config $themes = SSViewer::config()->get('themes') ?: $originalThemes; SSViewer::set_themes($themes); @@ -336,6 +337,7 @@ public function writeStaticPage() } finally { // Restore themes SSViewer::set_themes($originalThemes); + $this->extend('onAfterStaticWrite'); } // Make sure we have content to save