I am following the tutorial and adding an Authors section similar to the Staff page:
http://doc.silverstripe.org/doku.php?id=tutorial:2-extending-a-basic-site
I have created a holder and custom page type under them. The fields build and add correctly in the CMS, however the Image tab iframe has a caller error that doesn't make sense to me. The PHP call is_subclass_of is throwing a warning that "Unknown class passed as parameter".
This is a bizarre error as the class it is complaining about is finding my AuthorPage class under DataObject. Obviously the AuthorPage class is being included as I can create pages and work with it. Why would the Image type interface be blowing up on this?
Edit: This has been solved, see the second post
Code:
<?php
/*
* This is for individual Author entries
*/
class AuthorPage extends Page {
static $db = array(
'Name' => 'Text'
);
static $has_one = array(
'Photo' => 'Image'
);
/*
* Add our custom data bits
*/
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('Name'), 'Content');
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
return $fields;
}
}
class AuthorPage_Controller extends Page_Controller {
}
/*
* Holder for all Author Pages
*/
class Authors extends Page {
static $db = array();
static $has_one = array();
static $allowed_children = array('AuthorPage');
}
class Authors_Controller extends Page_Controller {
}
?>
Error Trace
Attached