MySource Matrix Resources

Main Content

Upgrading MySource Matrix from v3.8 to v3.10

Introduction

This guide will help you upgrade an existing MySource Matrix version 3.8 installation to version 3.10.

This upgrade requires you to have access to:

  • update the MySource Matrix source code
  • run database queries on the MySource Matrix database
  • edit the MySource Matrix configuration files

This guide assumes that your MySource Matrix installation is located at /home/websites/mysource_matrix. Please change any commands to the appropriate location if your installation is located elsewhere.

If your system contains the commercial or premium modules, please contact Squiz for updated versions of the modules before proceeding with the upgrade.

The modules must be upgraded at the same time as the core system.

Major version upgrades require you to delete all previous rollback data from your system. Rollback data is incompatible between major versions.

Ensure that you have a current backup of your existing system and rollback data before upgrading.

Stop Editing

No editing should be taking place during a major version upgrade. Before starting the upgrade, first ensure that all editors are logged out of the system.

Backup

Before starting any upgrade, always backup your MySource Matrix installation. See the MySource Matrix backup management guide for information on how to backup your MySource Matrix system.

Delete Stale HIPO Jobs

During a major version upgrade, stale HIPO jobs should be removed from the system. Log into the MySource Matrix administration interface as root user and go to the HIPO Herder screen. Lock this screen and delete all HIPO jobs that are listed. Note that there may not be any stale HIPO jobs in the system.

Get the New Source Code

The first thing you need to do is update the MySource Matrix source code. You can find out how to download the latest stable version of MySource Matrix on the installation page.

Once you have downloaded the source code, you need to replace the existing code with the newer version. This will not reset any configuration options or remove any content from your system.

These steps assume MySource Matrix is installed at /home/websites/mysource_matrix and that a tar.gz archive with the new source code exists within /home/websites
$ cd /home/websites
$ mv mysource_matrix mysource_matrix_3-8
$ tar -xzvf new_source.tar.gz
$ cd mysource_matrix
$ cp -r /home/websites/mysource_matrix_3-8/data .

Disable Rollback

At this point, you need to ensure that rollback is disabled before continuing. For help with disabling rollback, see the MySource Matrix rollback management guide.

Run Database Queries

The database schema has changed between 3.8 and 3.10. The step_02.php installation script (run in the next step) will make most of the necessary changes to the schema, but first some changes must be made manually.

This step assumes the name of your database is mysource_matrix

If you are using a PostgreSQL database, run the following:

$ psql -U postgres mysource_matrix
mysource_matrix=# DROP FUNCTION sq_get_parent_treeids(VARCHAR, INT, TIMESTAMP);
mysource_matrix=# \q

Run installation scripts

We can now run the installation scripts to upgrade the system. We use the step_02.php installation script to finish upgrading the database schema, the step_03.php installation script to install new asset types and upgrade old ones, and then the compile_locale.php script to update the installed language translations.

$ cd /home/websites/mysource_matrix
$ php install/step_02.php .
$ php install/step_03.php .
$ php install/compile_locale.php .

Reset Rollback Data

If you use the rollback feature of MySource Matrix, you can re-enable it at this point. You must use the --reset-rollback option when running the rollback management script to ensure all rollback data is deleted before rollback is started.

For help with resetting rollback, see the MySource Matrix rollback management guide.

Set Database Cache DSN

If your main.inc configuration file does not contain a SQ_CONF_DBCACHE_DSN variable, run the step_01.php installation script to get the new DSN and edit your main.inc file to make the value of the SQ_CONF_DBCACHE_DSN variable that same as SQ_CONF_DB2_DSN.

$ cd /home/websites/mysource_matrix
$ php install/step_01.php .
$ vi data/private/conf/main.inc
If your main.inc file contained the following content:
define('SQ_CONF_DB_DSN',      'pgsql://developers@db/matrix');
define('SQ_CONF_DB2_DSN',     'pgsql://developers@db/matrix');
define('SQ_CONF_DB3_DSN',     'pgsql://developers_secondary@db/matrix');
define('SQ_CONF_DBCACHE_DSN', '');
Update it to look like this:
define('SQ_CONF_DB_DSN',      'pgsql://developers@db/matrix');
define('SQ_CONF_DB2_DSN',     'pgsql://developers@db/matrix');
define('SQ_CONF_DB3_DSN',     'pgsql://developers_secondary@db/matrix');
define('SQ_CONF_DBCACHE_DSN', 'pgsql://developers@db/matrix');

Get All Users to Clear Browser Cache

The stylesheet for the MySource Matrix Administration Interface has changed in v3.10. To ensure the interface is laid out correctly, all users of the Administration Interface should clear their browser cache.

In Internet Explorer this is done by opening the Tools menu, choosing Internet Options, clicking the Delete Files button, ticking the Delete all offline content box and clicking OK.

In Mozilla Firefox the cache is cleared by opening the Tools menu, choosing Options, opening the Privacy tab and then the Cache sub-tab, and clicking the Clear Cache Now button.

Regenerate Your Metadata Schemas

It is strongly recommended that you log into the Administration Interface and regenerate any Metadata Schema assets that you may have in your system.