This guide covers the graphic migration of your charts from Ametys 4.3.x to 4.4.0.
Please also refer to the technical migration guide.
All calls to resolver.resolveXXX that hard-coded the first argument to 'metadata' must be changed to 'attribute' instead.
For example, the following code:
<xsl:variable name="imgPath" select="concat('illustration/image?contentId=', $orgunitId)" /> <xsl:variable name="imgUrl" select="resolver:resolveCroppedImage('metadata', $imgPath, $imgHeight, $imgWidth)"/>
should be replaced by:
<xsl:variable name="imgPath" select="concat('illustration/image?contentId=', $orgunitId)" /> <xsl:variable name="imgUrl" select="resolver:resolveCroppedImage('attribute', $imgPath, $imgHeight, $imgWidth)"/>
The easiest way to find these calls is to search for 'metadata' in all your XSL files.
SAX events generated for geocode data have changed. Latitudes and longitudes are now set in attributes rather than sub-nodes.
For example, the following code :
<xsl:variable name="geocode" select="ametys:contentAttribute(@id, 'geocode')"/> <xsl:if test="$geocode"> <marker title="{@title}" holder="{local-name()}" lat="{$geocode/latitude}" lng="{$geocode/longitude}"/> </xsl:if>
should be replaced by :
<xsl:variable name="geocode" select="ametys:contentAttribute(@id, 'geocode')"/> <xsl:if test="$geocode"> <marker title="{@title}" holder="{local-name()}" lat="{$geocode/@latitude}" lng="{$geocode/@longitude}"/> </xsl:if>
Following the switch to ExtJS 7, the kernel imports FontAwesome 5 and no longer FontAwesome 4 by default; as a result, in the "customized" part of the backoffice login page, you may have lost your icons.
The easiest way, if you haven't made any changes, is to start from the template https://code.ametys.org/projects/WEB/repos/template-web/browse/webapp/cms/WEB-INF/param/login.xsl?at=refs%2Fheads%2F4.4.x
The complicated version is to change the FontAwesome font calls to Font Awesome 5 Free Solid; but this may not be enough if you use brand icons like facebook... in that case, you have to load Font Awesome 5 Brands...
If in doubt, refer to the web template https://code.ametys.org/projects/WEB/repos/template-web/browse/webapp/cms/WEB-INF/param/login.xsl?at=refs%2Fheads%2F4.4.x
Warning: significant risk of regression
Particularly if you're cutting dates on the fly for very specific behaviors (substring).
Following a change in the way dates are stored, they are now stored in UTC and no longer in the server's time zone. This means that if you enter a date at 14:30 UTC, it's actually stored as 12:30 UTC. And if it's stored as 01:30, it's stored as 23:30 of the previous day.
La plupart des rendus actuels avec <i18n:date> ignorent les fuseaux horaires donc il peut y avoir pas mal de soucis.
In all your XSL, look for the use of <i18n:date> and <i18n:date-time> that concern dates from content attributes, and take time zone into account.
In practice, this will often involve replacing src-pattern="yyyy-MM-dd'T'HH:mm:ss" by src-pattern="yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
Même procédure pour <i18n:time>.
The types rich_text and multilingual_string were renamed in rich-text and multilingual-string. Search and replace all occurrences in XSL.
Note that case is important: the occurrences of "RICH_TEXT"should be replaced by "RICH-TEXT"
In your XSL the use of ametys:sitemap() must now have an argument to limit the depth:
View AmetysXSLTHelper documentation
The kernel charters (ODF, Workspaces and Doc) have been improved to facilitate overloading XSL.
See Workspaces Importing XSLs or ODF Importing XSLs.
Depuis la 4.4.1, pour corriger un ticket bloquant, concernant les liens vers les ressources (explorateur ou pièces jointes) les liens fournis dans la balise <uri> sont déjà préfixés par le site. Il faut donc à minima retirer ce préfixe qui est ajouté par la XSL de rendu du moteur de recherche (sauf si vous utilisez les XSL noyau).
Functional test to see if you're affected
Insert a search engine, selecting the Document type.
In preview mode, try downloading a document returned by this search engine.
If the link doesn't work with the duplicate context in the address, you're affected. (e.g. /cms/preview/www/cms/preview/www/_attachment/XXX.png)
Il est même recommandé de ne plus utiliser le contenu textuel de la balise <uri> mais de résoudre soit même l'adresse avec les attributs type et id fournis désormais sur <uri>.
Technical test to see if you're affected
If you've overloaded the"hit-resource-title-link-href" template at XSL , you're affected.
If not, you're probably not affected: you can run the functional test above to be sure.
In the hit-resource-title-link-href template:
If you had an overload to correct the ticket CMS-9900 your template simply becomes
<xsl:template name="hit-resource-title-link-href">
<xsl:value-of select="resolver:resolve(uri/@type, uri/@id, false())"/>
</xsl:template>
Depending on the plugins Ametys you use, you must follow the graphic migrations specific to each plugin :