From 71aec163b56598a3fb119b304a523794bc7ad74c Mon Sep 17 00:00:00 2001 From: Bjorn Radon Date: Tue, 10 Mar 2015 16:57:52 +0000 Subject: [PATCH] Forced a regeneration of class manifest. The call to BlogEntry::get() returned an empty set without it --- code/compat/pages/BlogEntry.php | 3 +++ code/compat/tasks/BlogMigrationTask.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/code/compat/pages/BlogEntry.php b/code/compat/pages/BlogEntry.php index 1d78954..12838f1 100644 --- a/code/compat/pages/BlogEntry.php +++ b/code/compat/pages/BlogEntry.php @@ -52,6 +52,9 @@ class BlogEntry extends BlogPost implements MigratableObject { if($this->ClassName === 'BlogEntry') { $this->ClassName = 'BlogPost'; $this->write(); + if($this->isPublished()){ + $this->doPublish(); + } } } diff --git a/code/compat/tasks/BlogMigrationTask.php b/code/compat/tasks/BlogMigrationTask.php index 4e786e5..6e78130 100644 --- a/code/compat/tasks/BlogMigrationTask.php +++ b/code/compat/tasks/BlogMigrationTask.php @@ -24,6 +24,8 @@ class BlogMigrationTask extends MigrationTask { } public function up() { + SS_ClassLoader::instance()->getManifest()->regenerate(false); + $classes = ClassInfo::implementorsOf('MigratableObject'); $this->message('Migrating legacy blog records');