Jump to:

23378 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » SS3 SiteConfig Problems on /dev/build

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

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

Page: 1
Go to End
Author Topic: 577 Views
  • danzzz
    Avatar
    Community Member
    175 Posts

    SS3 SiteConfig Problems on /dev/build Link to this post

    hi,

    I use this CustomSiteConfig.php

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

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: SS3 SiteConfig Problems on /dev/build Link to this post

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

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