Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX Re-enabling theme in ErrorPage->doPublish() (it's usually disa…

…bled in the publication context through LeftAndMain->init())

MINOR Reverted r88633, it breaks <base> tag in static HTML for ErrorPage->doPublish() (from r106777)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112537 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 35a3d79e87ef14d5c3e69bc5a74681318bdf6e4e 1 parent a1f9efc
@chillu chillu authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 core/model/ErrorPage.php
View
8 core/model/ErrorPage.php
@@ -122,12 +122,16 @@ function getCMSFields() {
function doPublish() {
parent::doPublish();
- // Run the page
+ // Run the page (reset the theme, it might've been disabled by LeftAndMain::init())
+ $oldTheme = SSViewer::current_theme();
+ SSViewer::set_theme(SSViewer::current_custom_theme());
$response = Director::test(Director::makeRelative($this->Link()));
+ SSViewer::set_theme($oldTheme);
$errorContent = $response->getBody();
+
// Make the base tag dynamic.
- $errorContent = preg_replace('/<base[^>]+href="' . str_replace('/','\\/', Director::absoluteBaseURL()) . '"[^>]*>/i', '<base href="$BaseURL" />', $errorContent);
+ // $errorContent = preg_replace('/<base[^>]+href="' . str_replace('/','\\/', Director::absoluteBaseURL()) . '"[^>]*>/i', '<base href="$BaseURL" />', $errorContent);
// Check we have an assets base directory, creating if it we don't
if(!file_exists(ASSETS_PATH)) {
Please sign in to comment.
Something went wrong with that request. Please try again.