- Release notes for the version you are updating to as well as for all intermediate versions.
- Certified stack
If you are migrating from a Magnolia release which has already reached end of life, please contact us for migration support.
Migration strategies for Magnolia 6.2
There are two different strategies for migrating to Magnolia 6.2, each with its advantages and disadvantages.
1. Migrate everything upfront
Advantages | Disadvantages |
---|---|
|
|
2. Migrate apps gradually and use the compatibility layer
Advantages | Disadvantages |
---|---|
|
|
Read more below about what has changed in Migrating to the new 6 UI framework.
What to update
Check the magnolia.properties
file
When upgrading Magnolia, it is always worth comparing your magnolia.properties
file with the one from the newly released Magnolia bundles. Below are the latest versions of the magnolia.properties
files for Magnolia 6.2.
Magnolia CE
Magnolia DX CoreApache Tomcat
If you use Apache Tomcat, note that we have upgraded to version 9.0.31. We recommend this update since it fixes some possible security vulnerabilities.
If you use another servlet container, check out the certified stack for supported versions.
Server configuration with relaxedQueryChars
Tomcat 9 has become less tolerant of special characters when compared to some of its previous versions. To bring back support for special characters as it was in Tomcat 8 (for instance, to query the delivery
endpoint API with filters), we have added the characters [
, ]
and |
to the relaxedQueryChars
attribute on the Connector
element in the server.xml
configuration file.
Third-party libraries
All changes in third-party libraries are managed via the BOM for third-party libraries . If you manage your bundles via Maven using the BOM, all updates will be handled automatically. Among the most notable third-party library updates in the Magnolia 6.2 release are:
- Vaadin 8.9.4
- Guava 28.2-jre
- Tika 1.23
- Jackrabbit 2.20.0
- Ehcache 3.7.1
Note: Due to an incompatibility issue, the items that remain on disk will be deleted after updating.
How to upgrade
General recommendations
You should be able to upgrade to the latest release in the Magnolia 6 branch directly from any previous Magnolia release that has not reached end of life. Only if you have UI or style customizations, we recommend that you first upgrade to the latest release in the Magnolia 5 branch and then to the latest release in the Magnolia 6 branch. For example: 5.6.8 →
→ 6.2.- Update all external libraries required by the Magnolia release to which you intend to upgrade.
- Because the upgrade process takes time and is vulnerable to incidents, we recommend you minimize the risk by cleaning up your system, removing unused data, reindexing everything and doing a full backup first.
Once Magnolia is running, check the Definitions app for deprecated or problematic definitions.
Specific aspects
Migrating to the new 6 UI framework
The UI in Magnolia 6.2 comes with a number of changes and new implementations. For their impact and more details, see Changes in Magnolia 6 UI.
Automatic conversions and the compatibility layer
To provide a smooth transition from Magnolia 5 UI to Magnolia 6 UI, the 6.2.x comes with the compatibility layer ItemProviderStrategy (magnolia-ui-framework-compatibility
), introduced to make the old 5 UI definitions work in the new 6 UI framework.
- Start by using the compatibility layer. It will try to convert the fields and forms on-the-fly to the effect that:
- The old dialog definitions can be referenced by actions of the updated apps and attempts will be made to convert the definitions on the fly.
The old 5 UI apps can still be used.
Note: The 5 UI and 6 UI app definitions differ considerably. Compare, for example, the following definition snippets of the Contacts app, including the Add contact action definition:
Then, convert the old definitions if you want to get rid of all deprecated code or to get the benefits of the new 6 UI features such as:
- Short
$type
aliases. - Column filtering.
- Default Cancel and Save actions.
- IUX slots.
jsonDatasource
(REST Clients).- Vaadin 8 with simplified data binding.
- Improved UI composition patterns.
- Sharing state with UI component context.
For example, see the following dialog and its 5 UI and 6 UI configurations:
- Short
Migrating fields and field validators
A number of field converters have been introduced since the release of Magnolia 6.2. For more details, see the Field converters page.
Migrating the definitions or using definition converters?
There is no simple answer to this question. It depends on a situation. Using definition converters can be considered a short-term remedy for the move from the old UI framework to 6 UI.
Definition converters that we ship do not migrate everything. The converters just adapt the old definitions to the new format at runtime.
Converters won't work on custom fields and custom validators, which you must migrate to Magnolia 6 UI.
Migrating field transformers
The Magnolia 5 UI field transformer classes no longer exist in the Magnolia 6 UI framework. Their functionality has been replaced by the ItemProviderStrategy
interface. For details, see Magnolia 6 UI ports of 5 UI field transformer classes.
Migrating custom modules
If you have custom modules that rely on the previous UI modules:
- Pre-built JAR files of your custom modules will be binary compatible with Magnolia 6.x. You can add them to your
WEB-INF/libs
folder without further changes. - If you want to compile and rebuild your custom modules:
The composition of submodules of the UI project has changed, and some submodules have been removed.
Several of the stock Magnolia apps have already been migrated to the 6 UI. Many of the legacy 5 UI apps have been moved to the-compatibility
modules, for examplemagnolia-pages-app-compatibility
.
Migrating content type based definitions
In Magnolia 6.2.x, the In this case, the app will be interpreted as a 5 UI app and you don't have to update its descriptor to conform to the 6 UI definition. As of Magnolia 6.2.3, a ‘ If you decorate, include, inherit or override definitions, make sure that you don't mix 5 UI and 6 UI definitions.!content-type
directive generates a Magnolia 6 UI app. This means that any overriding or decoration of a content-type based app needs to be updated to match the 6 UI. As an alternative, you can use the new !content-type-m5
directive, which generates a 5 UI app.reference
’ property for a 6 UI app can reference either a 6 UI or 5 UI style content-type.
Upgrading customized Pages and Assets apps
With the 6.2 release, the Pages and Assets apps have been migrated to the 6 UI framework. If in code you refer to any of these apps through app ID, be aware that under 6 UI, the ID is different.
App name | 5 UI ID | 6 UI ID |
---|---|---|
Assets | assets | dam |
Pages | pages | pages-app |
Due to module dependencies, most of the old 5 UI apps are still included in our webapps but are hidden in the UI. They are now part of the /modules/ui-admincentral/config/appLauncherLayout/hiddenApps
group.
An exception is the 5 UI Pages app, which has been removed from the CE webapps. To bring it back to a CE webapp, you need to add magnolia-pages-app-compatibility
to your webapp project.
Restoring the legacy 5 UI apps for authors
If you wish to let the editors use the old 5 UI apps instead of the new ones, the most straightforward procedure is:
- In the Configuration app, go to
/modules/ui-admincentral/config/appLauncherLayout/groups/edit/apps/
. - Rename
pages-app
topages
. - Go to
/modules/ui-admincentral/config/appLauncherLayout/hiddenApps/
. - Delete the
pages
item.
Restoring the legacy 5 UI apps during migration development
If you need to use the legacy apps during migration development, often side-by-side with the new 6 UI apps, consider some of these options:
- Configure a role-based setup.
- Rename or decorate an app with a different label. See Changing the title and icon of an app.
- Reconfigure the App launcher layout of groups through
/modules/ui-admincentral/config/appLauncherLayout/groups
. For example, add a new Edit group for the legacy apps:
H2 database - issues in v. 1.4.199 and 1.4.200
Our Certified stack page sets 1.4.200 as version baseline for the H2 embedded database in Magnolia 6.2. This H2 version fixes a consistency issue found in version 1.4.199 (https://github.com/h2database/h2database/issues/2139). However, even the 1.4.200 version introduces an issue (https://github.com/h2database/h2database/issues/2204) which may affect the structure of tables and the ability of H2 to read previously stored data.
To keep your systems and data secure, we recommend that you consider taking the following measures when upgrading to the Magnolia 6.2 branch:
- Avoid using H2 in version 1.4.199. This version was introduced with the following maintenance releases: 5.5.16, 5.6.13, 5.7.6 and 6.1.3.
- If you are still running version 1.4.192, don't upgrade to any of the maintenance releases just mentioned. Try updating to version 1.4.200 and see if you experience any issues. If you do come across some issues after the upgrade, contact our support.
Additionally, ensure that the H2 database is not exposed through your custom code modifications. Your installation will then not be affected by the uncovered security issue. Especially, please ensure that the DB is not exposed via your custom code modifications, for example by accessing the DB directly and exposing a query or by other payload going to it through your application directly. If you adhere to these recommendations, your installation will not be affected by the security issue. - If you have already upgraded to 1.4.199, downgrading is not possible due to upstream data structure changes that are incompatible with previous versions. Try updating to version 1.4.200 and see if you experience any issues. If you do come across some issues after the upgrade, contact our support.
- If you are using H2 only in development, you can:
- Delete the local database and downgrade to version 1.4.192.
or - Switch to another database, for example Derby, and reinstall your local installation.
- Delete the local database and downgrade to version 1.4.192.
Changes in the REST Client module
As of REST Client module version 2.0, released with Magnolia 6.2, the Magnolia RESTEasy Client module (magnolia-resteasy-client
) has been deprecated and merged into the Magnolia REST Client module. A relocation is in place which relocates magnolia-resteasy-client
to the magnolia-rest-client
module, see https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/browse/magnolia-resteasy-client-maven-relocate/pom.xml.
If your projects have a dependency to magnolia-resteasy-client
, we recommend that you:
- Either update and rebuild the projects without the dependency.
- Or add an older version of the dependency.
Additionally in this version of the module, ClientServiceDefinition
has been deprecated as well and ProxyDefinition
should be used instead.
Server push
in AdminCentral
Server-side push
functionality is now provided in AdminCentral. For this to work, you must update your WEB-INF/web.xml
file. It must declare async support on Magnolia's main filter.
<filter> <display-name>Magnolia global filters</display-name> <filter-name>magnoliaFilterChain</filter-name> <filter-class>info.magnolia.cms.filters.MgnlMainFilter</filter-class> <async-supported>true</async-supported> </filter>
Since Magnolia does not support push
operations over WebSockets, you must also add the following new context parameters:
<!-- The following two parameters prevent the Atmosphere Framework from attempting to install --> <!-- JSR-356 is not needed and causes issues with our servlet setup --> <context-param> <param-name>org.atmosphere.cpr.AtmosphereConfig.getInitParameter</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.atmosphere.websocket.suppressJSR356</param-name> <param-value>true</param-value> </context-param>
Solr module needs an additional dependency
If you are migrating from Magnolia 5.x and you are using the Solr module, you need to add the following dependency to your bundle:
<dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-core-compatibility</artifactId> </dependency>
Upgrading Maven-managed webapps
In this section, we assume that you use Maven to manage your (custom) webapp. How you do this depends on how you have organized your POM files.
Upgrading the versions of inherited BOM files
The most typical use case is that your custom webapp is based on one of Magnolia's preconfigured webapps. The structure of the Maven project that manages your webapp may look like this:
custom-project/ ├── custom-project-webapp │ ├── pom.xml │ └── src └── pom.xml
custom-project/custom-project-webapp/pom.xml
is the POM file of your custom webapp.Line 5: custom-project/pom.xml
is the parent POM file of your custom webapp. This file manages the dependencies and their versions.
Note that the parent POM (custom-project/pom.xml
) manages all versions for Magnolia modules as well as for third-party libraries. It imports info.magnolia.dx:magnolia-dx-core-parent
, which manages Magnolia Enterprise module versions and imports the following:
info.magnolia.bundle:magnolia-bundle-parent
to manage Magnolia CE module versions.info.magnolia.boms:magnolia-external-dependencies
to manage third-party library versions.
If the POM files for your custom webapp are organized as shown in this example, you will only need to change one property. In the <properties>
tag of your parent POM, change the version of the magnoliaBundleVersion
property:
<properties> <magnoliaBundleVersion>6.2</magnoliaBundleVersion> <foobarModuleVersion>1.2</foobarModuleVersion> <javaVersion>1.8</javaVersion> </properties>
magnoliaBundleVersion
to your required version. That is all you need to change in the POM files of your webapp.Checking the Maven dependency tree
Regardless of how your Maven project is organized, building the Maven dependency tree helps you analyze the versions of all the Magnolia modules and all the third-party libraries of your custom webapp.
Open a shell, go to the directory of your webapp and execute the Maven command for the dependency tree:
cd /Users/jdoe/dev/repo/custom-mgnl-webapps/custom-project/custom-project-webapp mvn dependency:tree
Upgrading manually
Known issues
See the Known issues page.