After upgrading to SS 2.4.5 my EventsPage will not load. The browser is not throwing up any specific errors simply"
"The page at www.mysite.co.uk says:"
that's it. I am a little rusty at the moment after an 8 month break from SS. Could someone please point me in the right direction for debugging.
The page is as follows:
EventPage.php
<?php
class EventPage extends Page
{
static $has_many = array (
'Events' => 'Event'
);
static $has_one = array(
'Flyer' => 'Image'
);
public function getCMSFields()
{
$f = parent::getCMSFields();
$manager = new DataObjectManager(
$this, // Controller
'Events', // Source name
'Event', // Source class
array('Date' => 'Date', 'Title' => 'Title', 'Link' => 'Link', 'Location' => 'Location & Time', 'Description' => 'Description'), // Headings
'getCMSFields_forPopup' // Detail fields function or FieldSet
// Filter clause
// Sort clause
// Join clause
);
$f->addFieldToTab("Root.Content.Events", $manager);
$f->addFieldToTab("Root.Content.Images", new ImageField('Flyer','Flyer'));
return $f;
}
}
class EventPage_Controller extends Page_Controller
{
}
?>
Event.php
<?php
class Event extends DataObject
{
static $db = array (
'Date' => 'Date',
'Title' => 'Text',
'Link' => 'Text',
'Location' => 'Text',
'Description' => 'Text'
);
static $has_one = array (
'EventPage' => 'EventPage'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new CalendarDateField('Date'),
new TextField('Title'),
new TextField('Link'),
new TextField('Location'),
new TextareaField('Description')
);
}
}
?>
many thanks