Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

admin/assets error


Reply

4 Posts   1544 Views

Avatar
Briohny

21 October 2008 at 5:18am Community Member, 199 Posts

This is the error message that is being displayed when i click on the 'Files & Images' link in the admin.

Fatal error: Class '' not found in C:\wamp\www\gulf\sapphire\filesystem\Folder.php on line 104

When i go to this file, this is the line that it is referring to:

$hasDbChild[$dbChild['Name']] = new $className($dbChild);

I have no idea how to fix this. Any thoughts are welcome!!

Thanks

Avatar
integral

22 October 2008 at 8:40am Community Member, 3 Posts

Hi Briony,

I am also experiencing the same problem http://www.silverstripe.com/site-builders-forum/flat/209417

Hopefully a developer will be able to help!

Avatar
Briohny

22 October 2008 at 9:18am Community Member, 199 Posts

Hi Integral. I've solved this problem!! Basically there is an empty ClassName in the database. If you log into your phpadmin and go to the 'files' table. Search all the fields and see if there are any that don't have a ClassName. Delete these records and refresh your database. Problem solved. :0

Avatar
integral

23 October 2008 at 4:37am Community Member, 3 Posts

Thanks Briohny!

I figured out what was causing the null entry in my database:

class SubPage extends Page {
static $db = array(
   'SubTitle' => 'Text'
);
static $has_one = array(
'Photo' => 'Image'
);

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('SubTitle'), 'Content');
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo1'));
return $fields;
}

^ The image field wasn't matching the database field.

Thanks again!