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.
Refer to the plugins compatibility table and increment the versions of your plugins (take the most recent 4.5-compatible version for each plugin ).
The technical migration is now supported by script.
script will perform certain simple tasks automatically, and signal any manual migrations required.
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.
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 has been moved to a new plugin extra-user-management.
If your project uses CAS or Kerberos:
The configuration is automatically migrated to the new plugin on the next reboot.
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.
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:
You are only affected by migration if your project contains compilation errors.
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.
The LIVE_LABEL variable has been moved to CMS.
WebConstants.LIVE_LABEL becomes CmsConstants.LIVE_LABEL
org.ametys.web.ObservationConstants.EVENT_CONTENT_UNPUBLISHED is replaced by org.ametys.cms.ObservationConstants.EVENT_CONTENT_UNTAG_LIVE
Depending on the plugins Ametys you use, you must follow the graphic migrations specific to each plugin :
Read the technical migration manual about adding the price to the classifieds template.
Read the technical migration manual about adding a new content type.
Read the technical migration manual about adding new content types
If the plugin "proxied-content" is used, you must add the plugin "proxied-content-site" dependency to the ivy.xml site file.