Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » admin/assets error

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

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

Page: 1
Go to End
Author Topic: 1517 Views
  • Briohny
    Avatar
    Community Member
    199 Posts

    admin/assets error Link to this post

    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

  • integral
    Avatar
    Community Member
    3 Posts

    Re: admin/assets error Link to this post

    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!

  • Briohny
    Avatar
    Community Member
    199 Posts

    Re: admin/assets error Link to this post

    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

  • integral
    Avatar
    Community Member
    3 Posts

    Re: admin/assets error Link to this post

    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!

    1517 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.