1131 Posts in 1965 Topics by 402 members
|Go to End|
26 December 2013 at 4:53am
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:
The live site is:
I've read the instructions over and over again and I'm still not succeeding.
I've tried deleting the following files:
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.
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.
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?
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:
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.
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.
|Go to Top|