Hi Everyone,
Having a bit of a problem that I hope someone could help me out with. Im trying to add an images tab in the backend. So the page is called PartnersPage.php and here is what i've added:
<?php
class PartnersPage extends Page {
static $db = array(
'Heading' => 'Text',
'SubHeading' => 'Text',
'WebLink' => 'Text'
);
static $has_one = array(
'TopPhoto' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('Heading'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('SubHeading'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('WebLink'), 'Content');
$fields->addFieldToTab("Root.Content.Images", new ImageField('TopPhoto'));
return $fields;
}
}
class PartnersPage_Controller extends Page_Controller {
}
But as soon as I add the Image Field the website goes down and says
"Sorry, there was a problem with handling your request.
Visit www.silverstripe.org to download the CMS"
Is this a common problem is there a simple fix for it?