ibexa

Path

ez publish / upgrading / direct upgrading / direct upgrading to 4.6 fro... / direct upgrading from 4.1 t...


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Direct upgrading from 4.1 to 4.6

This section describes how to upgrade your existing eZ Publish 4.1 installation directly to version 4.6. Make sure that you have a working backup of the site before you do the actual upgrade, and make sure the installation you are performing the upgrade on is offline.

Important upgrade notes:

The procedure for upgrading directly from version 4.1.x, 4.2, 4.3 or 4.4 to 4.6 consists of the following steps:

  • Upgrade the distribution files to 4.6
  • Upgrade custom extensions
    • 4.1.0 to 4.2
    • 4.2 to 4.3
    • 4.3.to 4.4
    • 4.4 to 4.5
    • 4.5 to 4.6
  • Upgrade the database to 4.6
    • 4.1.0 to 4.2
    • 4.2 to 4.3
    • 4.3 to 4.4
    • 4.4 to 4.5
    • 4.5 to 4.6
  • Regenerate the autoload array for extensions
  • Run the system upgrade scripts for 4.6
    • 4.1.0 to 4.2
    • 4.2 to 4.3
    • 4.3 to 4.4
    • 4.4 to 4.5
    • 4.5 to 4.6
  • Additional upgrade step
  • Enable ezjscore
  • Enable admin2-design for back-end
  • Clear the caches
  • Upgrade extensions

Check for requirements

The eZ Components and PHP requirements

The minimum version required of eZ Components with eZ Publish 4.6 is "ezcomponents-ezp46", containing a fix to the package. This version is bundled in eZ Publish 4.6 Enterprise. eZ Publish 4.6 is compatible with PHP version 5.2.1 and above, but certified on RHEL 6 and Debian 6, PHP 5.3.x distros. See http://ez.no/ezpublish/requirements for more info.

Step 1: Upgrade the distribution files

The easiest way to upgrade the distribution files is to unpack eZ Publish 4.6 to a separate directory and then copy the directories that contain site-specific files from the existing installation. Make sure that you copy the following directories:

  • design/example
  • design/example_admin
  • var
  • settings/siteaccess
  • settings/override
  • (index_cluster.php)

Cluster note: If you are using cluster mode its necessary to copy index_cluster.php from the old version.

Replace "example" and "example_admin" with the actual names of your site accesses.

Important note: Because the new directory has replaced the original directory, the directory permissions need to be fixed. Use the following commands to do this.

(You have the choice between Shell commands or Alternative shell commands):

  • Shell commands

These shell commands will give proper permission to the web server:

cd </path/to/your/eZ/Publish/directory>
chmod -R a+rwx design extension settings var
  • Alternative shell commands

 These commands will setup the permission more correctly, but require knowledge about the running web server (change 'nouser' to http server user).

cd </path/to/your/eZ/Publish/directory>
chmod -R og+rwx design extension settings var
chown -R nouser:nouser design extension settings var

Step 2: Custom extensions

If you are using custom extensions, the sub-directories inside the "extension" directory will also have to be copied. However, make sure that you do not overwrite any extensions that are included in eZ Publish, which currently are eZ Flow (2.x), eZ Online Editor (5.x), eZ OpenOffice Document format (2.x), eZ JSCore (1.x), eZ Image Editor (1.x), eZ Comments (1.x), eZ Multiupload (1.x), eZ MB Password Expiry (1.x), eZ Network (1.x), eZ REST API Provider (1.x), eZ Script Monitor (1.x), eZ SI, eZ Find (2.x). Note that upgrading the distribution files will overwrite the autoload arrays for extensions. You will need to re-generate the autoload arrays for active extensions later.

See the dedicated upgrade instructions for eZ Flow and Website Interface below.

The updated versions of eZ Flow and Website Interface will also install the following extensions:

  • eZ Website Toolbar
  • eZ Star Rating
  • eZ Google Maps Location

Note: For eZ Online Editor 5.x and eZ JS Core you will need to replace the following rewrite rules when using Virtual Hosts:

RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]

with:

RewriteRule ^/var/([^/]+/)?cache/(texttoimage|public)/.* - [L]

For more detailed instructions, see the dedicated eZ OE and eZ JS Core doc pages.

Step 3: updateimagesystem.php

This script is necessary to run if you have data of the "ezimage" datatype dating from before eZ Publish 3.3. In version 3.3 a new image system took over based on "ezimagealiashandler".

If you are upgrading to the 4.2 series of eZ Publish for the first time, and the installation has been running since prior to eZ Publish 3.3 then you need to run the "updateimagesystem.php" script before running any of the "dbupdate" scripts.

If the installation is a new installation or based on any eZ Publish version since 3.3 then you can skip running the "updateimagesystem.php" script.
If not, then execute it using: 

php update/common/scripts/4.1/updateimagesystem.php -s $SITE_ACCESS

Step 4: Upgrade the database

The update script for the database is located in the following locations, skip the ones that don't apply to the version your upgrading from:

<eZ Publish root>/update/database/<mysql|postgresql>/4.2/dbupdate-4.1.0-to-4.2.0.sql
<eZ Publish root>/update/database/<mysql|postgresql>/4.3/dbupdate-4.2.0-to-4.3.0.sql
<eZ Publish root>/update/database/<mysql|postgresql>/4.4/dbupdate-4.3.0-to-4.4.0.sql
<eZ Publish root>/update/database/<mysql|postgresql>/4.5/dbupdate-4.4.0-to-4.5.0.sql
<eZ Publish root>/update/database/<mysql|postgresql>/4.6/dbupdate-4.5.0-to-4.6.0.sql

You can run these with the appropriate sql command line tool or application.

Note on 4.1.x to 4.2 upgrade: You need to selectively choose the correct sql from first file above if your upgrading from 4.1.1, 4.1.2, 4.1.3 or 4.1.4.
If your upgrading from 4.1.1: Ignore everything above “-- END: from 4.1.1”.
If your upgrading from 4.1.2 or 4.1.3: Ignore everything above “-- END: from 4.1.2”.
If your upgrading from 4.1.4: Ignore everything above “-- END: from 4.1.4”.

Clustering:

If your upgrading from 4.1 or 4.2 using db or dfs cluster, make sure you apply the following sql updates (but for dfs make sure you change table name from "ezdbfile" to "ezdfsfile"):

<eZ Publish root>/update/database/mysql/4.3/dbupdate-cluster-4.2.0-to-4.3.0.sql
Schema changes

Note: These schema changes are only necessary to do if you have eZ Flow installed and if you are making the following upgrades:
4.1.1 -> 4.6
4.1.2 -> 4.6
4.1.3 -> 4.6
4.1.4 -> 4.6
4.2 -> 4.6

You must run this sql on the mysql client

ALTER TABLE ezm_pool ADD INDEX ezm_pool__block_id__ts_hidden ( block_id, ts_hidden );

MySQL

The "ezmysql" database driver has been deprecated in 4.5 and it is recommended to use the "ezmysqli" driver instead. This requires that the "mysqli" extension in PHP is enabled and can be archived by changing the driver in your override or siteaccesses "site.ini.append.php" settings to:

[DatabaseSettings]
DatabaseImplementation=ezmysqli
Cluster

The "Mysql DB/DFS Cluster" database back-end has not yet been deprecated, but it is recommended to use the same driver as the main database driver, so change your "file.ini.append.php" settings in override or siteaccesses to use" eZDFSFileHandlerMySQLiBackend" for DFS Cluster or "eZDBFileHandlerMysqliBackend" for DB Cluster.

Note: The "index_cluster.php" file should be updated to

define( 'STORAGE_BACKEND',          'dfsmysqli'    )

If you use DB cluster, remove "dfs" from the string.

Step 5: Regenerate the autoload array for extensions

The autoload system also has some changes, for example the autoload array for extensions is now placed in var/autoload of your eZ Publish installation (along the class changes in extensions itself).

To regenerate the autoload array, execute the following script from the root of your eZ Publish directory: 

php bin/php/ezpgenerateautoloads.php --extension

Step 6: Run the system upgrade scripts

4.1 to 4.2

  • correctxmlalign.php: after upgrading to 4.1 the default alignment for embedded images in the "ezxmltext" datatype is removed, this script will allow you to have the correct xmlalignment.
php update/common/scripts/4.1/correctxmlalign.php -s $SITE_ACCESS
  • fixorphanimages.php: this script will delete images from the storage directory that are no longer connected to any content object attribute
php update/common/scripts/4.2/fixorphanimages.php -s $SITE_ACCESS

4.2 to 4.3

This version includes a script to fix #15478: Node assignment is not removed when removing node from child list:

php update/common/scripts/4.3/updatenodeassignment.php -s $SITE_ACCESS

4.3 to 4.4

Update script for this version contained a bug and is repeated in 4.4 to 4.5 below, thus is not needed in this instruction.

4.4 to 4.5

For eZ Publish 4.4 which was upgraded from 4.3, run the following command from the root of your eZ Publish directory:

php update/common/scripts/4.5/updatesectionidentifier.php -s $SITE_ACCESS

Note: Skip this step if this your 4.4 installation is not an upgrade from 4.3. If you are uncertain, please run the script.

4.5 to 4.6

There are two system upgrade scripts that can be run for the eZ Publish 4.6 upgrade, "removetrashedimages.php" and "updateordernumber.php".

Script 1: If you want to ensure no trashed images remains on your setup because of image aliases not being restored when restoring object from trash (issue #017781), you do the following:

  1. make sure that no items remains in trash for any users (images from objects in trash would be impossible to restore not doing so)
  2. run the following cleanup script by executing this command:
$ php update/common/scripts/4.6/removetrashedimages.php

Note: It is safe to skip this test, this is only to free extra space.

Script 2: You need to run an upgrade script to update webshop order numbers issue (#018233) by running:

$ php update/common/scripts/4.6/updateordernumber.php

Note: If you don’t have webshop or you don’t have orders (table "ezorder") in your eZ Publish, you don’t have to run this script.

Step 7: Additional upgrade steps

Update "override.ini.append.php"

Content panes are not visible on the "User accounts" tab in the back-end. To fix it on an already-installed eZPublish, remove the following rules from your "override.ini.append.php" for your admin siteaccess:

[window_controls]
Source=window_controls.tpl
MatchFile=window_controls_user.tpl
Subdir=templates
Match[navigation_part_identifier]=ezusernavigationpart
 
[windows]
Source=windows.tpl
MatchFile=windows_user.tpl
Subdir=templates
Match[navigation_part_identifier]=ezusernavigationpart

... and clear the cache after removing. See separate step below.

Step 8: Enable ezjscore

Both the "admin2" design, "ezoe", "ezwebin", "ezflow" and several other extensions requires the ezjscore extension to be enabled, this is archived by editing your "settings/override/site.ini.append.php" settings file to make sure it looks like this:

<pre>
 [ExtensionSettings]
 ActiveExtensions[]
 ActiveExtensions[]=ezjscore
 </pre>

Step 9: Enable admin2 design for back-end

To enable admin2 open "site.ini" for your admin site access. For an eZ Flow site this would for instance be:

settings/siteaccess/ezflow_site_admin/site.ini.append.php

In this file include "AdditionalSiteDesignList[]=admin2" to your [DesignSettings]. It is important that you add the admin2 design before the admin design, in order to let extensions that have admin templates to continue to work. On an eZ Flow site, it would mean changing the settings from:

[DesignSettings]
SiteDesign=ezflow_site_admin
AdditionalSiteDesignList[]=admin
AdditionalSiteDesignList[]=ezflow

to

[DesignSettings]
SiteDesign=ezflow_site_admin
AdditionalSiteDesignList[]=admin2
AdditionalSiteDesignList[]=admin
AdditionalSiteDesignList[]=ezflow

When using a plain or eZ Webin install you should make the same changes. In this case you will of course have a different SiteDesign setting and no AdditionalSiteDesignList[]=ezflow line.

To enable users to change their Administration Interface preferences (Location and Re-Edit editing preferences), add the following line to the [Toolbar_admin_right] block in settings/siteaccess/<siteaccess_name>/toolbar.ini.append.php:

Tool[]=admin_preferences

So the block will then look like like this:

[Toolbar_admin_right]
Tool[]
Tool[]=admin_current_user
Tool[]=admin_bookmarks
Tool[]=admin_preferences

Step 10: Clear the caches

Whenever an eZ Publish solution is upgraded, all caches must be cleared in a proper way. Note: You should not be a root user when you start the caching process (refer to http://issues.ez.no/15823). The caching should be done from within a system shell:

  1. Navigate into the eZ Publish 4.5 directory.
  2. Run the script using the following shell command:
php bin/php/ezcache.php --clear-all --purge

Purging ensures that the caches are physically removed. When the "--purge" parameter is not specified, the caches will be expired but not removed.

Sometimes the script is unable to clear all cache files because of restrictive file/directory permission settings. Make sure that all cache files have been cleared by inspecting the contents of the various cache sub-directories within the "var" directory (typically the "var/cache/" and "var/<name_of_siteaccess>/cache/" directories). If there are any cache files left, you need to remove them manually.

Step 11: Upgrade extensions

When using eZ Webin and eZ Flow, these extension will also need to be updated.

The first thing to do is to change the extensions permissions. An example on how this is done:

$chmod -R a+rwx extension

4.1 to 4.2:

eZ Webin 1.4 to 1.5
or
eZ Flow 1.1 to 2.0

4.2 to 4.3:

eZ Webin 1.5 to 1.6
or
eZ Flow 2.0 to 2.1

4.3 to 4.4:

eZ Webin 1.6 to 1.7
or
eZ Flow 2.1 to 2.2

4.4 to 4.5:

eZ Webin 1.7 to 1.8
or
eZ Flow 2.2 to 2.3

4.5 to 4.6:

eZ Webin 1.8 to 1.9
or
eZ Flow 2.3 to 2.4

Geir Arne Waaler (21/09/2011 9:52 am)

Geir Arne Waaler (17/04/2012 11:33 am)


Comments

There are no comments.