Hey guys,
I'm just running through the #2 tutorial (http://doc.silverstripe.com/doku.php?id=tutorial:2-extending-a-basic-site) and have started to create some ArticlePages.
The problem I'm having is that when I go save the draft of a newly created ArticlePage, I get a big red "Error saving content" box down in the bottom right of the corner of the screen.
The draft *is* getting saved though - if I refresh the CMS 'My Site' view - the page that triggered the error is correctly listed as being in draft mode, and I can successfully publish from there.
So, not quite sure what's going on - I'm pretty sure I've followed the instructions accurately, here's my ArticlePage.php
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
}
class ArticlePage_Controller extends Page_Controller {
}
?>
...and my ArticleHolder.php...
<?php
/**
* Defines the ArticleHolder page type
*/
class ArticleHolder extends Page {
static $db = array(
);
static $has_one = array(
);
static $allowed_children = array('ArticlePage');
}
class ArticleHolder_Controller extends Page_Controller {
}
?>
The .ss pages are likewise
Running Windows, using the out-of-the-box Windows installer version of SS.
Any ideas?