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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Best way to upgrade silverstripe and keep customisations?


Go to End


6 Posts   3108 Views

Avatar
jorrie

Community Member, 40 Posts

29 March 2010 at 4:55am


What would be the best way to upgrade silverstripe?

And on a sidenode, whats the best way to keep customisations away from the core?
I feel php applications always are a pain to update
ruby on rails app is more simple with git

Avatar
Willr

Forum Moderator, 5523 Posts

29 March 2010 at 8:10pm

You'll find with SS that you should be able to customize most of the functionality by using decorators and subclasses which are keep in your mysite folder and themes which need to be overridden can be from your own templates folder. This applies to css and templates for core, modules. Directly editing the core sapphire or cms folders as you say can be a very bad idea and hard to maintain.

If you're hacking the core to fix a bug, then if its a valid bug make a ticket / patch for it to be included in core. I mean every apps going to be a pain to update if you hack around with the core. If you used to git you can always try out git-svn to 'manage' svn like git. I find like git but managing svn externals are a bit of a pain.

Avatar
Double-A-Ron

Community Member, 607 Posts

13 April 2010 at 1:13am

Edited: 13/04/2010 1:15am

As Will said, I will NEVER edit the files in:

/sapphire
/cms
/jsparty

It is so easy to extend sapphire's core classes that there is very little need to do so. If you simply subclass the original core class, all the original functionality is there for you to tinker with without touching the main classes.

The advantage of Git you speak of with RoR is exactly the same on Silverstripe using Subversion. I use it to update core all the time.

Avatar
mattclegg

Community Member, 56 Posts

22 July 2010 at 9:32pm

What about when customizing the css or .ss files for a module?
Is there an easy way to preserve these and keep php code upto date with SVN?

Avatar
TotalNet

Community Member, 181 Posts

23 July 2010 at 10:37am

The convention here is to create a module sub-theme of you theme which looks like: themes/mytheme_module take a look at blackcandy_blog as an example.
You can add templates and css to your hearts content knowing that your changes will not get overwritten by a module update, although you may need to update them to include any API changes.

If you want to change php code for a module then you're best off decorating it instead of editing module code.

hth

Avatar
mattclegg

Community Member, 56 Posts

23 July 2010 at 8:35pm

Edited: 23/07/2010 8:36pm

Thanks for your reply TotalNet.

I'm glad to hear that themes/mytheme_module will overwrite default templates.

However, Im having trouble extending an existing module. Can you see this thread?