Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » [SOLVED] Custom Site Config

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

Page: 1
Go to End
Author Topic: 2309 Views
  • KoJans
    Avatar
    Community Member
    14 Posts

    [SOLVED] Custom Site Config Link to this post

    Hi all!

    I' trying to extend my SiteConfig, and followed the example on: http://doc.silverstripe.org/sapphire/en/reference/siteconfig. But after http://.../dev/build?flush=all I get this errormessage:

    Fatal error: Object::add_extension() - Can't find extension class for "CustomSiteConfig" in /var/www/silverstripe/sapphire/core/Object.php on line 526

    .
    What have I done wrong?

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: [SOLVED] Custom Site Config Link to this post

    here's another doc...
    http://www.ssbits.com/tutorials/2010/2-4-working-with-siteconfig/

    but it sounds like you have missed the "<?php" tag as it hasn't got any of that code you've added - total guess though

  • KoJans
    Avatar
    Community Member
    14 Posts

    Re: [SOLVED] Custom Site Config Link to this post

    Thanks,

    I'll have a look at ssbits.
    Adding the <?php didn't do the trick...

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: [SOLVED] Custom Site Config Link to this post

    Adding the <?php didn't do the trick...
    So it wasn't there before? That's not good - all the php code needs to start with that.

    If it wasn't there and you've added it... then you need a dev/build... but that is probably still failing - remove the "Object::add_extension()" part, deb/build, then re-add the "Object::add_extension()" and dev/build again

  • KoJans
    Avatar
    Community Member
    14 Posts

    Re: [SOLVED] Custom Site Config Link to this post

    Thanks again!

    That worked. Silly of me to forget the <?php part... I'll remember this!

  • vodoomoth
    Avatar
    Community Member
    22 Posts

    Re: [SOLVED] Custom Site Config Link to this post

    You might also want to delete the contents of your temporary folder.

    I had to delete the contents of Windows\Temp\<SilverStripe temp folder> before the "Fatal error: Object::add_extension() - Can't find extension class" disappeared.

    2309 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.