This page describes how to use the Migration module and belongs to the Migration, valid for Magnolia CMS 4.4.6 to 4.5 (or higher).
Installing the Migration module
Ensure that you have the correct version of the Migration module.
|Magnolia CMS version||Migration Module version|
|4.5.15 or later||1.2.6 or later|
Copy the .jar files from
/magnolia-enterprise-4.5.x/add-ons/magnolia-4-5-migration-1.x folder to the
If you build your project using Maven, add the following dependency:
Updating template scripts
Template scripts are updated with a Groovy script (uses ANTLR library to parse).
The script only updates the template scripts, not the related configuration. The script writes code snippets in the migration report that tell you how to change the template configuration correspondingly.
This is what happens in the script:
- Migrates template scripts.
- Comments out old, unsupported code.
- Adds comments with new alternatives or suggestions.
- Removes old
contentNodeIteratortag from areas and creates new area scripts if needed (usually not).
- Writes an
areatag in place of the original
- Finds available components and creates a code snippet that is written into the report, containing how to change the configuration.
- Most of the changes needed are listed in Tags migration for 4.5 and STKUtil methods migration for 4.5. See also the Migration FAQ and Migrating template scripts.
To update template scripts:
- Start Magnolia CMS.
- Edit the
MigrateTemplateExecuteScriptsGroovy script. Define the template scripts to migrate.
Save the script and run it.
An example output of migrated template script looks like this:
An example of migration report:
Carefully go through the templates, removing all old blocks that are commented out.