Custom Siteconfig returns empty after "Saving"

Silverstripe version 4.1.0

I have added some custom fields to the SiteConfig (settings menu). The fields are showing and when I enter something, press save, it says saved.

But when I go to another section (pages for example) and then go back to the settings page, my just entered fields are empty again.

Is this a possible bug?

This is the code I am using to add the fields.

use SilverStripe\ORM\DataExtension;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TextField;

class SentConfig extends DataExtension {     

    public static $db = [
        'PoweredBy' => 'Varchar',
        'PoweredByLink' => 'Varchar'
    ];

    public function updateCMSFields(FieldList $fields) 
    {
        $fields->addFieldsToTab("Root.Main", TextField::create("PoweredBy", "Powered by"));
        $fields->addFieldsToTab("Root.Main", TextField::create("PoweredByLink", "Powered by link"));
    }
}

Cheers

I think I know what went wrong.

I had: public static $db

While it should: private static $db

After changing that and did the dev/build/?flush, it seems to work.

Silly mistake.

Is the extension registered in your yml config and did you build.

It seems the former is true, but it also seems the db fields aren’t added. Could you check the database if the field is in the schema?