diff --git a/src/ErrorPage.php b/src/ErrorPage.php index dae68d0..7242f28 100644 --- a/src/ErrorPage.php +++ b/src/ErrorPage.php @@ -330,6 +330,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); @@ -344,6 +345,7 @@ public function writeStaticPage() } finally { // Restore themes SSViewer::set_themes($originalThemes); + $this->extend('onAfterStaticWrite'); } // Make sure we have content to save