Notes on doing a big upgrade - 1.08 to 1.5.2
Posted: Fri Feb 06, 2009 11:08 pm
I've just got round to doing a long overdue upgrade on a couple of CMSMS sites, the oldest being version 1.08, and thought I would post a few notes I made, in case they were of use to anyone else in a similar position.
Nothing particularly original here - most of it is plundered from the forums. I would like to say thanks to everyone who posts, because I am consistently impressed with the amount of useful advice available.
First off, I know everyone says it, but BACK UP everything before you start. Something is going to go wrong, isn't it? Also, do the upgrade on a local installation and make sure everything is working before copying it back to your production environment. In my case I used XAMPP on my PC to run the local copy and phpMyAdmin to poke around the database.
Basic Install
Unzipped the latest CMSMS version over the local copy of my 1.08 site and ran the install wizard from the /install directory. This all ran successfully, after which I was prompted to upgrade the database schema. Again, the db upgrade script ran OK.
Upgrading my other site (version 1.2.1) was a bit trickier. In this case the db schema did not update successfully. I ran the upgrade again, but this time checked the "create tables" option. This upgraded successfully, but wiped existing db content, which I had to manually import from my backup database.
Modules
Upgraded all my installed modules to the latest versions, downloading the XML files from the CMSMS forge and importing them using the module admin page.
Editor
Switched to using the Tiny MCE editor, because the existing FCK editor no longer worked correctly with the latest version of CMSMS.
Search
Modified existing Search Module template, because my existing template used the {$inputbox} tag which no longer appears to be supported. I replaced this with a hard coded HTML tag of the form . See the default Search Module template for an example.
News
Converted all my existing file based news templates (no longer supported) to database templates. I used the following SQL to find all the places where I was referencing my existing templates:
SELECT c.content_name, cp.content FROM cms_content c, cms_content_props cp WHERE c.content_id = cp.content_id and cp.content like "%.tpl%"
Replaced dateformat parameter with cms_date_format modifier. Remove dateformat="%b %d %Y" from all the {news} tags on my pages, and added the date formatting to the templates instead, e.g:
{$entry->postdate|cms_date_format:"%b %d %Y"
Content type = "news" no longer exists, so my existing news page had disappeared from the admin page listing! To fix this, I located the row for the news page in the “content” table and updated the "type" column value to “content”. I then added the {news} tag to the page content area to display news items.
Form Builder
I found that upgrading Form Builder defaulted the submission action to "display submission template" instead of my existing action, which was to display another page, so I had to change the "After form is submitted" option on the Form Submission tab.
This is obviously not a detailed description of the upgrade process, but might help anyone who is as tardy as I was and is planning to upgrade an old version. Thanks to all the CMSMS developers for continuing to develop a great piece of software and making the upgrade a relatively painless process.
Nothing particularly original here - most of it is plundered from the forums. I would like to say thanks to everyone who posts, because I am consistently impressed with the amount of useful advice available.
First off, I know everyone says it, but BACK UP everything before you start. Something is going to go wrong, isn't it? Also, do the upgrade on a local installation and make sure everything is working before copying it back to your production environment. In my case I used XAMPP on my PC to run the local copy and phpMyAdmin to poke around the database.
Basic Install
Unzipped the latest CMSMS version over the local copy of my 1.08 site and ran the install wizard from the /install directory. This all ran successfully, after which I was prompted to upgrade the database schema. Again, the db upgrade script ran OK.
Upgrading my other site (version 1.2.1) was a bit trickier. In this case the db schema did not update successfully. I ran the upgrade again, but this time checked the "create tables" option. This upgraded successfully, but wiped existing db content, which I had to manually import from my backup database.
Modules
Upgraded all my installed modules to the latest versions, downloading the XML files from the CMSMS forge and importing them using the module admin page.
Editor
Switched to using the Tiny MCE editor, because the existing FCK editor no longer worked correctly with the latest version of CMSMS.
Search
Modified existing Search Module template, because my existing template used the {$inputbox} tag which no longer appears to be supported. I replaced this with a hard coded HTML tag of the form . See the default Search Module template for an example.
News
Converted all my existing file based news templates (no longer supported) to database templates. I used the following SQL to find all the places where I was referencing my existing templates:
SELECT c.content_name, cp.content FROM cms_content c, cms_content_props cp WHERE c.content_id = cp.content_id and cp.content like "%.tpl%"
Replaced dateformat parameter with cms_date_format modifier. Remove dateformat="%b %d %Y" from all the {news} tags on my pages, and added the date formatting to the templates instead, e.g:
{$entry->postdate|cms_date_format:"%b %d %Y"
Content type = "news" no longer exists, so my existing news page had disappeared from the admin page listing! To fix this, I located the row for the news page in the “content” table and updated the "type" column value to “content”. I then added the {news} tag to the page content area to display news items.
Form Builder
I found that upgrading Form Builder defaulted the submission action to "display submission template" instead of my existing action, which was to display another page, so I had to change the "After form is submitted" option on the Form Submission tab.
This is obviously not a detailed description of the upgrade process, but might help anyone who is as tardy as I was and is planning to upgrade an old version. Thanks to all the CMSMS developers for continuing to develop a great piece of software and making the upgrade a relatively painless process.