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

Stackoverflow Q&A Site


Go to End


6 Posts   819 Views

Avatar
HenryP

Community Member, 5 Posts

9 June 2015 at 11:59am

Edited: 09/06/2015 12:00pm

Hi All,

I'm quite new to SilverStripe but I have 15 years PHP experience. I'm liking a lot of it so far even compared to Symfony 2 which is my current favourite platform.

The only big complaint I have is it seems extremely hard to Google answers to questions I commonly come across. A lot of indexes point to broken links etc... or there simply isn't a result. A lot of times it for basic info such as assigning a value to a has_one relationship. If I dig really deep I do find stuff in this forum but it's not coming through in Google results and often they are questions that have remained unanswered for many years.

A stackoverflow Q&A site would be a valuable resource for SilverStripe developers in my view

Are there any official plans to open one? I see its not even currently a proposal:

http://discuss.area51.stackexchange.com/search?q=silverstripe&s=d05dec6a-f094-40ec-8a04-c88f0077b967

Thanks in advance.
Henry

Avatar
Pyromanik

Community Member, 419 Posts

11 June 2015 at 9:43pm

Edited: 11/06/2015 9:47pm

I don't understand.
http://stackoverflow.com/questions/tagged/silverstripe ?

I think your issue might be that you're coming across a lot of outdated stuff. Although even then the basic principals are the same.
Perhaps you're overthinking things because you're used to lower level frameworks (from what I understand of Symfony2).

Because SilverStripe is a bit more monolithic, it takes care of a lot of things for you. If it's a *_many relation, then you get the advantage of DataList::add, but for has_one you can simply set the ID to the foreign object.
The tutorials can be a lot of help here. Even though you're an experienced programmer, the foundations of SilverStripe are new. Plus your experience should mean you'll just fly through them :)

There is also this old article that could be of help for finding aid when you're stuck. http://www.silverstripe.org/blog/seeking-support-in-silverstripes-social-sphere/
The IRC channel is usually actually the best place for experienced folks.

Avatar
camfindlay

Forum Moderator, 267 Posts

12 June 2015 at 9:08am

We did do an area 51 proposal a while back, however it was deemed to be part of the general StackOverflow community at the time and closed by their mods.

We could perhaps look at in the future, in the mean time to can find SilverStripe tagged Q&A on StackOverflow.

Avatar
HenryP

Community Member, 5 Posts

12 June 2015 at 3:03pm

I'll give you an example. I've just stumbed upon a problem where non-logged in users can't view my recent changes.

I can see that `stage=stage` is required.

Google does not reveal how to apply database changes to <tablename>_Live

Avatar
Devlin

Community Member, 344 Posts

12 June 2015 at 7:43pm

The content you created is in draft mode and is not published yet. Additionally to your $record->write(), you'll need to publish it with $record->publish('Stage', 'Live').

http://docs.silverstripe.org/en/3.1/developer_guides/model/versioning/#writing-versions-and-changing-stages

Avatar
Pyromanik

Community Member, 419 Posts

12 June 2015 at 11:57pm

Edited: 13/06/2015 12:01am

In the CMS there are 2 buttons, Save and Save & Publish.
One saves a draft, the other makes it live as well.
You are doing the former, not the latter.

Only content editors who are signed in and viewing the draft site can see your changes.
Normal users should not be able to see ?stage=Stage

User docs seem a little less fleshy, but this link on this is: http://userhelp.silverstripe.org/framework/en/for-website-content-editors/creating-and-editing-content#saving-your-page-as-a-draft

If you are trying to update a page programmatically, then see the post above.