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   1566 Views

Avatar
Briohny

Community Member, 199 Posts

21 October 2008 at 5:18am

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

Community Member, 3 Posts

22 October 2008 at 8:40am

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

Community Member, 199 Posts

22 October 2008 at 9:18am

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

Community Member, 3 Posts

23 October 2008 at 4:37am

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!