Permalink
Browse files

Merge pull request #157 from silverstripe-big-o/staticPublishingFix24

Static publishing fix24
  • Loading branch information...
2 parents 4abe136 + 838ac97 commit 3fff44a5b4aca5d54f69beb0f84cf2e895bf806d @chillu chillu committed Jul 9, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 code/staticpublisher/FilesystemPublisher.php
@@ -186,11 +186,12 @@ function publishPages($urls) {
$response = Director::test(str_replace('+', ' ', $url));
Requirements::clear();
-
-
-
+
singleton('DataObject')->flushCache();
+ //skip any responses with a 404 status code. We don't want to turn those into statically cached pages
+ if (!$response || $response->getStatusCode() == '404') continue;
+
// Generate file content
// PHP file caching will generate a simple script from a template
if($this->fileExtension == 'php') {

0 comments on commit 3fff44a

Please sign in to comment.