Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Upgrade from 3.6.6 to 3.9.1

Hi All,

could you help me, please, with upgrade fork from 3.6.6. to 3.9.1? Step by step without lose any data and my settings (change of theme for example) etc.. Thanks a lot

Rudo

There have been a lot of database changes between 3.6 and 3.7. I think it's best to start from a new install, and if you have used modules that don't come with fork cms, find & install the updated versions of those modules.

I think it's pretty hard to upgrade because of the database changes. I tried to write a php script to upgrade the database from 3.6.6 to 3.7 and it worked with a bit of effort but a lot has changed between 3.7 and 3.9 so I don't think it works anymore for 3.6.6 > 3.9

The parameters.yml file also changed between v3.6.6 and 3.9. Most important changes are written in the upgrade guides. But those guides are mostly useful if you want to upgrade your own module.

UPGRADE_3.7.md

UPGRADE_3.8.md

UPGRADE_3.9.md

Hi, the recommendation in the help for major updates is "My advice would be to reinstall your Fork CMS setup." But doesn't the content get lost this way?

Unfortunately yes, but the database has changed a lot in the previous versions so a simple update is not possible. Fork CMS is also converting the core code to use Symfony2 components which will lead to more maintainable code and less bugs. That means the core has changed a lot in the past year, so updating is not so easy.

If it's a small website, I would say the easiest way would be to install a new version on your local machine and install the theme you're using and then copy/paste the text of your website until you have the same website running.

However if you're using a lot of modules, then it get's difficult. If you're good with mysql, maybe you can look for changes between the old and new table of the module. Most changes in the database are just field names that are uppercased though, so no real structural changes.

Here's my database upgrade 3.6.6 to 3.7 script but I think you'll need to update a few things. I just compared a clean install from 3.6.6 and 3.7 while writing this script and this script converts the old database. Custom modules etc are not updated, so you can modify the database values yourself. And solve a lot of error's that you'll probably will get.

I would say the best way to try to upgrade is this: If you're good with php and mysql, this could be a lot of work to update the database website but it should be possible. Start with a fresh fork cms installation, copy the files folder, theme and custom modules of your website to the installation and then start copying table rows from the old database to the new database... But be aware of the meta table that contains all the url's used in the modules :-) that table can be tricky

Hi,

I've recently performed an upgrade and wrote a small script to help out.

It worked on my relatively simple install of Fork, let me know how it goes if you try it.

Looks very nice, I'll give it a try on an old site if I have some spare time :-) I'll add a PR if I had to make some changes

Thanks for your help. But I think this is no procedure to be productive that for every new release users "invent" scripts to migrate sites. If this is the concept of this CMS I guess it will not attract serious users.

I totally agree. This particular upgrade was more significant than most - I'd argue it should probably have been a major version number change since it is so backward compatible breaking.

There's also no in built upgrade process for modules - I personally end up manually deploying my constant developed and updated modules, with manual DB upgrade scripts, etc.

Don't mean to totally denigrate Fork - there's obviously a lot of work been put into it and I do prefer it to many other PHP and non-PHP CMS.

I agree that it's hard to upgrade and things could be a lot better

Fork CMS doesn't do a lot of database changes and if there should be database changes, they only happens in 3.x versions, so for example between 3.6.6 and 3.7 there were a lot of database values and files/folders renamed to a camelcased name in order to use namespaces etc and also to follow the PSR-2 coding standard that Symfony is using.

Like I said a few posts above, Fork CMS used to have a lot of custom code and libraries (e.g. Spoon library) and is slowly converting to a full stack Symfony2 application. The Symfony2 framework is very popular, has very good components that are extremely well tested by thousands of users, which will minimize bugs in the future, make it easier for php developers to start learning Fork CMS development, thus make the community grow, etc. But this all means that Fork CMS has to make some essential core changes every now and then, so it's not very easy for users to upgrade from an old version.

I don't think there were (many) db updates in version 3.8 and 3.9. My website is running on Fork CMS 3.9 and I keep it up to date by using Git to pull fixes and updates from the 3.9.X master branch. But when there's a new 3.X version, I first check if there were database changes before I merge the changes of the new version.

However, upgrading is always difficult. Most web agencies that use Fork CMS deliver a great website to their clients but no one keeps the core code of the CMS up to date, except for security bugfixes ofcourse. Wordpress has a built-in updater but I had some problems too with that. If there's one module on the website that isn't up-to-date and compatible with the new version of wordpress, the site breaks and you have to clean up a lot of errors.

Last time I spoke to some of the core developers, a CMS updater was one of the topics, but it's quite difficult to make a good one (preferably based on the git repo). Every modules should then also use good versioning, keep track of migration sql files for every version of the module, that gets executed when the site or module gets updated etc. Really a big feature :p That could be great for sure, but first they want to finish the whole integration of all the Symfony2 components like Doctrine and Twig...

It's definitely something for the future, but not right now...

So if I understand well, it's going to be virtually impossible for me to upgrade to the latest fork unless I become a coder ?

I don't know much about databases and how to change/upgrade them manually, I don't know this much about php/mysql.

At this point, isn't it just better for me to move to another cms that has both ease of use for creating content as well as upgrading ? But I paid for a theme, this means I would really like that it doesn't stop working.

At this point, is the only good way for me to update , to copy all my content in text files and remake the articles, links and pages from scratch on a new installation ? I'm not looking forward to this. But I know I'm going to have to upgrade at some point for security reasons.

That's why I moved away from fork. Updating for IT experts only is a show stopper for a "simple" CMS.

Especially when lots of the functionality they expect you to know or control aren't even available on your webhost.

I went away from dreamhost and I had a very special deal there, $10 / month for unlimited data/space, they didn't support fork so I went to a host here in balgium who told me they could support it, but I end up not having composer and always need to ask them stuff when I screw up the upgrade process.

I'm a bit disgruntled but I guess I'll just let the site live as long as it's not so insecure that I'll get hacked.

I think a cms which is so userfriendly and so easy to make site with shouldn't be such a hassle to upgrade.

It's as if philips expecting you to assmeble your own microwave oven.

With a step by step guide, I could do it, but there's lots of essential things missiing, both me not knowing how to alter databases without grinding the site to a halt :).

I'm almost going to have to pay someone to upgrade this and then I'd rather make the choise to go back on wordpress,.

I make music, I don't program :P

I moved to wordpress, too. Maybe not as pretty as fork but easy updating - even automatic. Perfect for me as a DAU ;-)

I agree that fork cms should be easier to upgrade. But at the moment, almost every new version of fork cms contain core upgrades to support Symfony framework more and more. And new big changes such as a whole new template engine, new database access layer and object mapping (Doctrine) are coming. But the average user won't notice this, unless you start writing your own code for modules etc.

So yes, Fork cms should become easier to upgrade in the future (aside from using git merge). But for average users there's not much benefit obtained from upgrading your website to the latest version.

I should check on dreamhost but normally I can install fork cms on almost every hosting, even crappy one.com can run a fork site :p If you want to use composer on the server, you'll need SSH access and download the composer.phar etc, otherwise you'll need to transfer the whole vendors folder with FTP

The thing is that I wanted my google analytics to work again and you posted an upgrade guide that seemed nice but then, when I logged into SSH, there was no composer and the host doesn't allow this. This means I would have to move again, or ask them for assistance, which again costs money if it's a huge task.

So yeah, for all these other reasons it seems useless to upgrade but for security reasons I would like it, AND for

I hope that at some point it will have a way to upgrade older versions. Now I know this is a huge task for the developer as well because all these specific database upgrades have to be scripted,

And I respect fork as a cms because it's incredible to USE, just not "noob friendly"

i update 3.9.2

Bugfixes:

Core: Fixed bug with decoding in truncate modifier Core: Fixed encoding ampersand for action url Groups: Fix (in add/edit) for executing widgets for which the module doesn't exists. Mailmotor: Fix wrongly cased classname Blog: make sure images can get reverted together with their revision Formbuilder: Fix reply option

web: may loc nuoc gia dinh

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/