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

Upgrade issues


Go to End


4 Posts   2299 Views

Avatar
blud1mnd

Community Member, 2 Posts

26 December 2013 at 4:53am

Happy Holidays!

I have been trying for days to upgrade Silverstripe and I fail each time.

Here's a short screencast with the files on the server:

http://screencast.com/t/Dcfb72bEkdb8

The live site is:

http://excelhcg.com/excelsite

I've read the instructions over and over again and I'm still not succeeding.

I've tried deleting the following files:

CMS
FRAMEWORK
SAPPHIRE

and then uploading the new CMS and FRAMEWORK from 3.1.2 and the site crashes.

I've tried removing CMS, FRAMEWORK, SAPPHIRE and all the mods and then uploading CMS and FRAMEWORK and then I get a 404 Error.

I've tried renaming SAPPHIRE to FRAMEWORK and then overwriting the folder with FRAMEWORK from 3.1.2 and nothing.

I'm not even getting php errors, it's like the data is missing completely.

The only time it seems happy is when I don't touch SAPPHIRE, however there is no SAPPHIRE in the update.

Any ideas, I've been at this for days and it's driving me insane.

Thank you for your help.

Amichai

Avatar
camfindlay

Forum Moderator, 267 Posts

26 December 2013 at 2:10pm

If you are upgrading from a 2.4.x site to 3.1.2 you may need to review all your custom application code and check to ensure the modules you have installed are compatible with 3.1.2. From your screencast I see you have the dataobject_manager module with I know doesn't work with 3.1.2 and may mean you need to refactor any code that used that module to use the GridField instead. Uploadify and swpupload are also modules I believe are no longer required (or even work) with 3.x. The theme engine has also changed (all "control"'s are now "with" or "loop" tags).

It is not as simple as just updating the core files (cms and framework/sapphire) for a move between versions 2 and 3 of SilverStripe. There will have also been some changes to the installer/base project files (see: https://github.com/silverstripe/silverstripe-installer).

Best option may be to get a fresh copy of SilverStripe 3.1.2 running and then start migrating your custom code over (starting with your pagetypes and themes) piece by piece refactoring anything no longer compatible until you have your site running over on 3.x.

Hope that points you in the right direction.

Avatar
blud1mnd

Community Member, 2 Posts

26 December 2013 at 7:31pm

Much bigger project than expected.

Thanks for the advise, I'll go with the fresh install.

Any further advice?

Avatar
theruss

Community Member, 3 Posts

7 February 2014 at 10:04am

What Cam says is accurate in that you have also to upgrade your custom logic found in mysite (or whatever folder you've defined in $project in _config.php).

There are a couple of tools (admittedly basic) that can help you to upgrade your logic and template logic:

https://gist.github.com/phptek/3902357

This is a bash script that you can run over your project folder and it'll automatically rewrite deprecated methods (2.4) to their 3.0 equivalents. It wouldn't be hard to improve this by grepping the filesystem for '@deprecated 3.1' to give you a list of the method signatures etc that have changed in 3.1.

https://github.com/sunnysideup/silverstripe-upgrade_silverstripe

This offering was based on the first shell-script but is more advanced in that it'll give you a brief rundown (a "dry-run") of what is going to change, before you flag to it that you want to _actually_ change it.

Note: Ensure you're using version control or you've backed-up your project dirs, in case you wish to revert the changes that either of these offerings will make.

Good luck.