Forced a regeneration of class manifest. The call to BlogEntry::get() returned an empty set without it

This commit is contained in:
Bjorn Radon 2015-03-10 16:57:52 +00:00
parent 06c6bd4889
commit 71aec163b5
2 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,9 @@ class BlogEntry extends BlogPost implements MigratableObject {
if($this->ClassName === 'BlogEntry') {
$this->ClassName = 'BlogPost';
$this->write();
if($this->isPublished()){
$this->doPublish();
}
}
}

View File

@ -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');