Technical migration 4.4 to 4.5


This guide covers the technical migration of your Ametys CMS application from version 4.4.x to 4.5.0.
See also the graphical migration guide.

  1. Compatibility table plugins
  2. Assisted migration
  3. Manual migrations
    1. Solr and indexed data
    2. CAS and Kerberos authentication
    3. Workflows
      1. Workflow definition files
      2. Plugin workflows
    4. Sources JAVA
      1. API Expressions (JCR)
      2. Variable LIVE_LABEL
      3. De-publication event
  4. Plugins
    1. Plugin ClassifiedAds
    2. Plugin Flipbook
    3. Plugin Multimedia
    4. Plugin Proxied Content

Compatibility table plugins

Refer to the plugins compatibility table and increment the versions of your plugins (take the most recent 4.5-compatible version for each plugin ).

Assisted migration

The technical migration is now supported by script.

script will perform certain simple tasks automatically, and signal any manual migrations required.

  1. Download script Download file "migrate-code-helper-4.5-v006.ant" (16 Kb)
  2. Move the file to the root of the project containing the code to be migrated
  3. Run script ant (with default task "migration")

In orange indicate operations performed automatically.

In red indicate operations to be carried out manually.

Once you've completed these assisted migrations, you can carry out the other manual migrations that follow.

Manual migrations

Solr and indexed data

The Solr server must be reinstalled.
Download version 4.5 http://releases.ametys.org/release/org.ametys / solr-app/4 .5.x/4.5.0/zips/

Check that the setenv-solr.sh file sets Java 11 in SOLR_JAVA_HOME (or the default jvm, which would be java11).

After restarting the server Solr then Ametys, run a full indexing operation.

CAS and Kerberos authentication

CAS and Kerberos authentication has been moved to a new plugin extra-user-management.

If your project uses CAS or Kerberos:

  • add the plugin "extra-user-management" dependency to your application's ivy.xml file. CMS
  • add the dependency to plugin "extra-user-management-site" in the ivy.xml file of your site application.

The configuration is automatically migrated to the new plugin on the next reboot.

Workflows

Workflow definition files

First, the WEB-INF/param/workflows.xml is no longer supported. You must move all your workflow files to the WEB-INF/param/workflows and their name must be the workflow name followed by the file type suffix .xml. Delete the file  WEB-INF/param/workflows.xml so present.

Core workflow definition files are now included in jar.

If your project does not have any workflow overloads, migration is simply a matter of deleting the folder WEB-INF/param/workflows.

The first thing to do is to ensure that your workflows have no project overload.

All right, delete the WEB-INF/param/workflows files calendar-simple.xml, editionfo.xml, thesaurus.xml and contentio.xml that are no longer in use.
Also delete the calendar-default.xml (the latter has not been removed; it is included in plugin workspaces, but project overloads would not be supported).

Next, you'll need to compare your remaining files with those of the latest template version you delivered (e.g. if you were in 4.4.10, compare your workflow files with template 4.4.10; if you were in 4.5 M4, compare your workflow files with template 4.5M4).

The files concerned are (in alphabetical order): blog.xml, bpm-default.xml, calendar-default.xml, container.xml, content.xml, course.xml, courselist.xml, course-part.xml, extraction-description.xml, form-default.xml, job-application.xml, newsletter.xml, orgunit.xml, person.xml, program.xml, udorgunit.xml, ugc-classified-ads-prevalidation.xml, ugc-classified-ads-postvalidation.xml, user.xml, reference-table.xml, subprogram.xml, wall-content.xml, workspaces-content.xml

If a file is not included in this list, it is a project-specific workflow, so keep it.

If the file contains project overloads, keep them and apply the necessary migrations detailed here.

Otherwise, delete the file. You'll then be able to use the kernel version and benefit from fixes/improvements without further migration.

If at the end of your file WEB-INF/param/workflows is empty, delete it.

Plugin workflows

The plugins default-form-workflow, default-odf-workflow, default-workflow and default-bpm-workflow templates have been removed.

The buttons, components, key i18n, resources of these plugins are now included in jars.

Compare your plugins default-*** with those of the latest template version you delivered (e.g. if you were in 4.4.10 compare your plugins with template 4.4.10, if you were in 4.5 M4, compare your plugins with template 4.5M4).

If plugin.xml is identical (and plugin does not include a JAVA source), delete the plugin folder.

If plugin.xml contains differences, remove all components or extensions identical to the kernel version. Keep only the project specificities.

Then analyze your specific needs:

  • if this is the declaration of a component/button/menu specific to your application, keep it as is.
  • if it's a modification to the declaration of a kernel button/menu/component, you'll have to disable the kernel button/menu/component to use yours.

 

Sources JAVA

You are only affected by migration if your project contains compilation errors.

API Expressions (JCR)

Some constructors of MetadataExpression, StringExpression, BooleanExpression, DateExpression, DoubleExpression, LongEpression and MultilingualStringExpression took Booleans as parameters for unversioned and/or case-insensitive data. These booleans are replaced by a ExpressionContext

For example, in the following line :

new StringExpression("meta", Operator.EQ, "NiCe'VaLuE", false, true)

the first Boolean refers to the unversioned side, the second to case insensitivity. This line can therefore be replaced by :

new StringExpression("meta", Operator.EQ, "NiCe'VaLuE", ExpressionContext.newInstance().withUnversioned(false).withCaseInsensitive(true))

or by :

new StringExpression("meta", Operator.EQ, "NiCe'VaLuE", ExpressionContext.newInstance().withCaseInsensitive(true))

since the boolean for unversioned is set to false by default. The boolean for case sensitivity also defaults to false.

Variable LIVE_LABEL

The LIVE_LABEL variable has been moved to CMS.

WebConstants.LIVE_LABEL becomes CmsConstants.LIVE_LABEL

De-publication event

org.ametys.web.ObservationConstants.EVENT_CONTENT_UNPUBLISHED is replaced by org.ametys.cms.ObservationConstants.EVENT_CONTENT_UNTAG_LIVE

Plugins

Depending on the plugins Ametys you use, you must follow the graphic migrations specific to each plugin :

Plugin ClassifiedAds

Read the technical migration manual about adding the price to the classifieds template.

Plugin Flipbook

Read the technical migration manual about adding a new content type.

Plugin Multimedia

Read the technical migration manual about adding new content types

Plugin Proxied Content

If the plugin "proxied-content" is used, you must add the plugin "proxied-content-site" dependency to the ivy.xml site file.

Back to top