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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

[SOLVED] Custom Site Config


Go to End


6 Posts   4821 Views

Avatar
KoJans

Community Member, 14 Posts

19 July 2011 at 2:27am

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?

Avatar
swaiba

Forum Moderator, 1899 Posts

19 July 2011 at 2:53am

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

Avatar
KoJans

Community Member, 14 Posts

19 July 2011 at 4:20am

Thanks,

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

Avatar
swaiba

Forum Moderator, 1899 Posts

19 July 2011 at 4:35am

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

Avatar
KoJans

Community Member, 14 Posts

19 July 2011 at 7:32am

Thanks again!

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

Avatar
Voodoo Priest

Community Member, 32 Posts

27 December 2012 at 6:36am

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.