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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Adding Logo field to SiteConfig

Go to End

5 Posts   1605 Views


Community Member, 9 Posts

8 October 2013 at 8:09pm

I am trying to add a Logo image field to SiteCOnfig under SS 3.1. I first followed the instructions on extending SiteConfig at : everything went Ok.
I then changed the lines

private static $db = array(
   'FooterContent' => 'HTMLText'
public function updateCMSFields(FieldList $fields) {
  $fields->addFieldToTab("Root.Main", new HTMLEditorField("FooterContent", "Footer Content"));

private static $has_one = array(
  'LogoImage' => 'Image',		
public function updateCMSFields(FieldList $fields) {
    "Root.Main", new UploadField("LogoImage", "Choose an image for your site logo"));

but it doesn't work. I can select a file for download (no drag and drop area however), but on validating, the screen is not updated to reflect my choice, and while, on saving, a message tells me "saving is Ok, nothing at all is uploaded.

This worked perfectly in SS 3.05.
Thanks for help


Community Member, 9 Posts

12 October 2013 at 9:11am

After upgrade to SS 3.1.1, problem still pending ...
Any idea ?


Community Member, 545 Posts

14 October 2013 at 5:42pm

Curious, I have Image realtions on SiteConfig extension working fine on a few sites. The fact that field is rendering correctly may be the problem


Forum Moderator, 267 Posts

6 January 2014 at 9:26am

Just tested your code on a complete fresh copy of the latest stable version (3.1.2), seems to all work perfectly.

Make sure you have run a dev/build (either in the browser http://localhost/dev/build/ or via command line) to ensure the database actually has the column in the DB to save the Image relationship.


Forum Moderator, 1379 Posts

6 January 2014 at 10:41am

I would like to point to this post.

I don't know if it has anything to do with your problem, but there seems to be a (FireFox) issue with 'UploadField -> from your computer' after a CMS reload...