This guide covers the technical migration of your Ametys CMS application from version 4.3.x to 4.4.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.4-compatible version for each plugin ).
In the file runtime.xml delete the following line:
<org.ametys.cms.repository.comment.CommentManagerExtensionPoint>org.ametys.web.repository.comment.WebCommentManagerExtensionPoint</org.ametys.cms.repository.comment.CommentManagerExtensionPoint>
In the WEB-INF/param/workflows directory of your application, for all workflow definition files containing copy actions (generally 111 and 222) :
<function type="avalon"> <arg name="role">org.ametys.XXX.CreateYYYByCopyFunction</arg> </function> <function type="avalon"> <arg name="role">org.ametys.cms.workflow.EditContentFunction</arg> </function>
In addition, there has been a renaming, to be impacted by search/replace in workflow files:
In addition, the workflow definition files for users .xml and udorgunit directory entities .xml need to be reworked.
In action 200, add the pre-function here after the section <restrict-to> and the <results> :
<pre-functions> <function type="avalon"> <arg name="role">org.ametys.cms.workflow.EditContentFunction</arg> </function> </pre-functions>
These files are required if your application uses the plugin directory (user-directory).
The multilingual_string and rich_text types used in the definition of content type attributes have been renamed multilingual-string and rich-text respectively.
Search your content type definitions for all occurrences of type="multilingual_string" and type="rich_text" to replace them.
In the definition of a content type, it is no longer possible to have 2 versions (view + edition) of a view with the same name.
The migration concerns all your content types (specific or overloaded) and the "main" view. There are two possible scenarios:
Named query parameters metadataSetName, fallbackMetadataSetName and isEditionMetadataSet were renamed in viewName, fallbackViewName and isEdition
Search for all occurrences of metadataSetName, fallbackMetadataSetName and isEditionMetadataSet in your files sitemap.xmapyour sources java and your files JS to replace them.
The parameters of a I18nizableText are now I18nizableTextParameterThis means there may be compilation errors, which are easy to resolve.
In the #validate to three arguments with the Map of values coming from the form, the values will now always be encapsulated in a SynchronizableValuefor simplicity's sake.
A simple way to retrieve the actual value is to use DataHolderHelper.getValueToValidate(value)
Extension points carrying the org.ametys.plugins.contentio.synchronize.clientsideelement.CollectionSelectionAwareAddTaskClientSideElement class must now take the org.ametys.core.ui.SelectionAwareAddTaskClientSideElement class and under the class tag, the following tags must be added:
<class> [...] <schedulable-param-name>collectionId</schedulable-param-name> <selection-target-id>^synchronizableContentsCollection$</selection-target-id> [...] </class>
Search your plugin.xml files for any references to CollectionSelectionAwareAddTaskClientSideElement.
In the demo web template, plugin default-content has been removed.
In the demo data template, plugin default-content has been renamed "demo-content".
This plugin provides an example of a content type ("Simple content").
If you have this plugin in your application, check that this content type is not used (org.ametys.cms.default.Content.simple), and if this is the case, this plugin can be removed.
The plugin welcome has been removed from templates.
The "Welcome" tool is now provided by the kernel.
Customization of this tool (i.e. the text it contains) is provided by each project:
To migrate this plugin you have 3 possibilities:
Case of ODF applications using the ODF kernel
charter The ODF kernel charter brings its own welcome message.
By simply deleting the plugin welcome, you'll have a default welcome message adapted to the ODF application and the ODF charter.
You can customize this message if required in your charter, which extends the ODF kernel charter.
You'll find an example of overloading in the "demo-odf" charter of the ODF web template.
In your XSL index_**.xsl you can now :
- use helper methods XSL org.ametys.web.transformation.xslt.AmetysXSLTHelper
- use keys i18n
The plugin default-sitemap has been removed from templates.
Site map icons and decorators can be added :
The old WEB-INF/param/sitemap-icons.xml file is no longer in use.
It contained :
From now on, feature icons/decorators are provided by the kernel and plugins ; and chart icons must be provided by graphic charts.
In your sitemap-icons.xml file, if you had icons and/or decorators specific to charter labels (e.g. SECTION, SUBSECTION, DIRECTACCESS), you will have to create them in each of your charters using these labels:
Icons and decorators linked to plugins are already imported automatically (page type container, link or node; exclusion of SEO, invisible, limited access, translation, scheduled publication). So don't just move your old file, filter its contents.
Your skins/[SKIN]/conf/sitemap-*.xml files should therefore contain only elements linked to skin.
In the template, these files contain very few rules: icons and decorators linked to SECTION, SUBSECTION and DIRECTACCESS.
Example of a sitemap-icons file.xml:
<icons> <!-- Validated sections --> <icon> <order>5</order> <glyph>ametysicon-file94 validated</glyph> <conditions> <tags> <tag>SECTION</tag> </tags> <live /> </conditions> </icon> <!-- Sections --> <icon> <order>6</order> <glyph>ametysicon-file94</glyph> <conditions> <tags> <tag>SECTION</tag> </tags> </conditions> </icon> </icons>
Example of a sitemap-decorators file.xml:
<decorators> <!-- Direct access --> <decorator id="direct_access"> <label i18n="true">PLUGINS_WEB_SITEMAP_DECORATOR_DIRECT_ACCESS</label> <glyph>ametysicon-link23</glyph> <conditions> <tags> <tag>DIRECTACCESS</tag> </tags> </conditions> </decorator> </decorators>
Then delete the file WEB-INF/param/sitemap-icons.xml as well as plugin default-sitemap.
By deleting the plugin default-sitemap you will lose the i18n keys in "plugin.default-sitemap:". So remember to move them to the graphic charts first.
If your chart is a chart that extends the ODF kernel chart, there is no need to create the files skin/[SKIN]/conf/sitemap-icons.xml and skin/[SKIN]/conf/sitemap-decortors.xml.
They are included in the ODF chart.
The plugin default-editionstyle template has been removed.
Web and non-web applications
In the file WEB-INF/param/runtime.xml delete the following lines:
<org.ametys.cms.clientsideelement.styles.HTMLEditorStyleExtensionPoint>org.ametys.cms.clientsideelement.styles.StaticHTMLEditorStyleExtension</org.ametys.cms.clientsideelement.styles.HTMLEditorStyleExtensionPoint>
Data (non-web) applications only
Move the file WEB-INF/param/edition-styles.xml in the WEB-INF/param/edition-styles.
In this file delete all occurrences of : plugin.default-editionstyle and plugin="default-editionstyle"
Move the i18n and resources directories of plugin default-editionstyle to WEB-INF/param/edition-styles
Finally, delete plugin default-editionstyle.
The plugin default-ctypes has been removed from the demo web template. It was a plugin for demonstration purposes only.
If you have it in your projects, it's probably useless and can be removed.
This plugin provided resources and key i18n related to the addition of 2 and 3 column views for articles and news, and a "slideshow" view for photo galleries. These 3 views have been removed and replaced by view parameters.
If your application is a Ametys ODF application, follow the migration guide from version 4.3 to version 4.4 ofODF.
Depending on the plugins Ametys you use, you must follow the technical and/or graphic migrations specific to each plugin :
The Solr server must be reinstalled.
Download version 4.4 http://releases.ametys.org/release/org.ametys / solr-app/4 .4.x/4.4.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.
The JDBC connector MySQL has been upgraded to version 8. Advertised compatibility with versions of MySQL remains unchanged, but in practice you may have a problem with timezones (try doing nothing, but if it crashes, Ametys won't start, so you'll soon see).
Under Windows, you need to modify the conf in C:\ProgramData\MySQL\MySQL Server 5.7\my.ini (or whatever your version) and add, for example :
default-time-zone = '+01:00
Under Linux, this is done in the mysql conf (my.cnf or equivalent, depending on your distribution) with the parameter :
default_time_zone = '+01:00
The default-time-zone value can also refer to a string such as 'Europe/Paris', but to do this you need to follow the instructions at https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html
This can be done at theAmetys level in the data source configuration by adding: serverTimezone=Europe/Paris, which gives, for example:
jdbc:mysql://localhost/Ametys_CMS?useSSL=false&serverTimezone=Europe/Paris