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.

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

config.yml extensions does not work


Go to End


6 Posts   1652 Views

Avatar
XorPush

Community Member, 10 Posts

4 July 2015 at 7:31pm

I was trying to add some extensions to Member through config.yml and also tried app.yml, the syntax was OK and still, it worked only when I added the same to _config.php as Object::add_extension('Member', 'Shops');
What do think guys, is it the normal behavior?

Avatar
Pyromanik

Community Member, 419 Posts

5 July 2015 at 6:38am

Sounds like you forgot to flush.
Silverstripe caches default config settings (things in private statics and yaml).

Log in as an admin, then load the site with ?flush on the end of the URL.

Avatar
XorPush

Community Member, 10 Posts

6 July 2015 at 5:35pm

That is why it is strange. Doing dev/flush has become one my most used command ;) , I did try that, no changes. I mean it works with adding objects to _config.php, I am just curious why a nice feature doesn't work.

I love SS, but sometimes the lack of examples just drives me crazy...

Avatar
camfindlay

Forum Moderator, 267 Posts

7 July 2015 at 11:18am

Edited: 07/07/2015 11:19am

There is no dev/flush, you should be using ?flush=1 as a query string. There is a dev/build which does a flush too depending on the version of 3.1.x

You use the dev/build when you change the database model only.

Use flush when you change the yaml or add new php classes to the site (rebuild the manifest).

Avatar
XorPush

Community Member, 10 Posts

3 August 2015 at 7:44pm

I know there is no dev/flush, I wrote that figuratively...

Avatar
Pyromanik

Community Member, 419 Posts

3 August 2015 at 10:06pm

Edited: 03/08/2015 10:07pm

Probably easier to say "build & flush" then to avoid confusion.
I thought exactly what Cam did.