Upgrade notes - 6.6

Warning

This documentation describes upgrading from 6.5.3 to 6.6.

Upgrade Steps

1. Backup the installation

Backup you current installation. This is described in Backup and Restore.

You could also do a dump of the system, but then you will loose versions if you have to reload it.

2. Install new version

Download Enonic XP http://repo.enonic.com/public/com/enonic/xp/distro/6.6.2/distro-6.6.2.zip and install according to your setup.

Tip

Remember to update any startup scripts you might have to launch your new installation given a server restart

3. Configure XP_HOME

The next step depends on your setup. Do you have your $XP_HOME folder outside or inside the $XP_INSTALL folder?

Outside the $XP_INSTALL - folder:

Make sure the new installation points to the correct $XP_HOME folder.

Inside the $XP_INSTALL - folder:

Copy your $OLD_XP_INSTALL/home folder to the the new $NEW_XP_INSTALL/ (on all nodes).

4. Stop the old installation

5. Start the new installation

6. Reindex your data

Since there are changes to the index-structure, you will have to reindex your data. Your site will not be available while you do the reindex. Both branches in cms-repo and the master branch of system-repo must be reindexed, and the “-i” index option must be enabled:

./toolbox.sh reindex -a su:password -r cms-repo -b draft,master -i
./toolbox.sh reindex -a su:password -r system-repo -b master -i

The reindex is usually processing around 500-1000 contents pr second.

Cluster now defaults to false

Cluster discovery is now turned off by default to prevent unintentional forming of a cluster when two xp-instances are started on the same machine. To enable clustering, an option in $XP_DISTRO/home/config/com.enonic.xp.elasticsearch.cfg must be set:

node.local = false

See Clustering for more details about configuring clustering.

Content Studio detail panel widgets

The widgets displayed in the “Content Studio” detail panel are no longer able to retrieve the selected content using the Javascript library “portal” like a page or a part.

Instead, the widget controller will receive the ID of the selected content as a parameter “contentId”. The controller can then use the Javascript library “content” to retrieve the selected content. Two new functions have also been added to the Javascript library “content”: getSite and getSiteConfig

  • If you have installed widgets, please install a version compatible with Enonic XP 6.6
  • If you have developed a widget, please update your code to use the “content” library instead. Below are some examples:
//Before
var content = portalLib.getContent();
//After
var content = contentLib.get({
    key: req.params.contentId
});
//Before
var site = portalLib.getSite();
//After
var site = contentLib.getSite({
    key: req.params.contentId
});
//Before
var siteConfig = portalLib.getSiteConfig();
//After
var siteConfig = contentLib.getSiteConfig({
    key: req.params.contentId,
    applicationKey: app.name
});

Custom Error 401 Handling

Previously, if an unauthenticated user or an authenticated user with missing rights requested a restricted content, the server would return a 403 error. The case of an unauthenticated user will now return a 401 error.

  • If you have developed a custom error page (see Error Handling) with a function handle403, please update your code, if necessary, by adding the function handle401.

Admin Virtual Host

If virtual hosting is enabled (enabled = true) in the Virtual Host Configuration then the admin mapping is required.

  • If a mapping includes /admin, add the new property userStore and set its value to system
  • If no mapping for /admin exits, create one and set the userStore property to system

Below is an example:

enabled = true

mapping.test.host = localhost
mapping.test.source = /
mapping.test.target = /
mapping.test.userStore = system

mapping.intranet.host = enonic.com
mapping.intranet.source = /
mapping.intranet.target = /portal/master/enonic.com

mapping.admin.host = enonic.com
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system