diff --git a/src/Model/BlogPost.php b/src/Model/BlogPost.php index 2abae30..98d235d 100644 --- a/src/Model/BlogPost.php +++ b/src/Model/BlogPost.php @@ -501,6 +501,8 @@ class BlogPost extends Page * @var DBDatetime $publishDate */ $publishDate = $this->dbObject('PublishDate'); + $publishDate->setValue($this->PublishDate); + if (!$publishDate->exists()) { return false; } @@ -600,6 +602,7 @@ class BlogPost extends Page * @var DBDatetime $date */ $date = $this->dbObject('PublishDate'); + $date->setValue($this->PublishDate); if ($type != 'year') { if ($type == 'day') { @@ -628,6 +631,7 @@ class BlogPost extends Page * @var DBDatetime $date */ $date = $this->dbObject('PublishDate'); + $date->setValue($this->PublishDate); return Controller::join_links($this->Parent()->Link('archive'), $date->format('Y')); }