Well, not exactly BROKE it... but it's doing some pretty hoopy stuff...
I wanted to add an editable sidebar to my page so I updated Page.php as follows:
<?php
class Page extends SiteTree {
static $db = array(
'SidebarHTML' => 'HTMLText'
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Sidebar", new HtmlEditorField( "SidebarHTML"));
return $fields;
}
}
class Page_Controller extends ContentController {
}
?>
The CMS still works -- after a fashion. I have a new tab in the CMS called 'Sidebar'. I can edit content in main field and in 'sidebar' and write to the DB. It's only when I 'save' the page that the funky stuff happens. I get a facefull of goobledegook, (see screenshot) hit refresh and suddenly all is well...
Unfortunately I'm a designer who is still coming to terms with PHP -- so I can't see anything wrong with the code. It worked in older projects but doesn't seem to like SilverStripe 3... am I calling on a resource that has been deprecated / removed?
Any advice gratefully appreciated!!