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, biapar, Willr, Ingo, swaiba

SS3 SiteConfig Problems on /dev/build

Go to End

2 Posts   867 Views


Community Member, 175 Posts

8 October 2012 at 2:51am

Edited: 08/10/2012 3:22am


I use this CustomSiteConfig.php

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

Then on /dev/build:

[User Error] Couldn't run query: SELECT DISTINCT "SiteConfig"."ClassName", "SiteConfig"."Created", "SiteConfig"."LastEdited", "SiteConfig"."Locale", "SiteConfig"."Title", "SiteConfig"."Tagline", "SiteConfig"."Theme", "SiteConfig"."CanViewType", "SiteConfig"."CanEditType", "SiteConfig"."CanCreateTopLevelType", "SiteConfig"."FooterContent", "SiteConfig"."ID", CASE WHEN "SiteConfig"."ClassName" IS NOT NULL THEN "SiteConfig"."ClassName" ELSE 'SiteConfig' END AS "RecordClassName" FROM "SiteConfig" WHERE ("Locale" = 'de_DE') LIMIT 1 Unknown column 'SiteConfig.FooterContent' in 'field list'

Whats wrong here?

Object::add_extension('SiteConfig', 'CustomSiteConfig');

in _config.php is set.

Shouldnt /dev/build create the new Column? The new column conatins in the query, thats wrong.

If I create the column before runing /dev/build no errors occure.


Forum Moderator, 1190 Posts

10 October 2012 at 5:37am

Hi Danzzz,

I just copied and replayed your code (needed something like it anyway ) and for me it worked fine... Went as far as switching to German :)

I hope it's something trivial after all...