Breaking: The map script is a module 

Description 

Version 2.4 built the stylesheet and the script of the partner map from sources and moved them into a frontend/ subdirectory, see Breaking: The map assets are built and moved. The script was still a classic script. It is an ES module now, registered in Configuration/JavaScriptModules.php and addressed by the bare specifier @fgtclb/academic-partners/frontend/map.js. The stylesheet of the map is not shipped any more, see Breaking: The partner map ships no stylesheet.

The map module imports Leaflet and its marker cluster plugin as modules as well, see Important: The partner map loads its libraries as modules.

Impact 

An installation that uses the shipped templates needs to do nothing.

An installation that loads JavaScript/frontend/map.js with <f:asset.script> gets a classic script tag, which does not execute an ES module, and the map stays empty.

Affected Installations 

Installations that override Templates/Partner/Map.html or the partial Partials/Partner/Map.html, or reference map.js from their own site package.

Migration 

In an overridden template or partial, replace the script reference and drop the one to map.css:

<f:asset.module identifier="@fgtclb/academic-partners/frontend/map.js" />
Copied!