Hi here is my code in Producto.php, is a little change from the "extend a basic site" tutorial. (staff part)
class Producto extends Page {
static $db = array(
);
static $has_one = array(
'Foto' => 'ProductPage_Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Images", new ImageField('Foto'));
return $fields;
}
}
class Producto_Controller extends Page_Controller {
}
class ProductPage_Image extends Image {
function generateThumbnail(GD $gd, $width, $heigth) {
$gd->setQuality(90);
return $gd->paddedResize($width,$heigth,"F0F0F0");
}
public function Thumbnail($width)
{
return $this->getFormattedImage('Thumbnail',$width, 70);
}
}
i create a few page of this type and add images to every product.
All this works perfect in live site, Thumbnail are created perfect.
But in CMS when click "Files & Images" i get : Fatal error: Class 'ProductPage_Image' not found in D:\...\sapphire\core\model\DataObject.php on line 1096
Why i get this error?