Breaking: Frontend assets are built and loaded differently
Description
The stylesheet and the script of the study plan are now compiled from sources in the repository rather than maintained as finished files, and both changed where they live and how they are loaded.
Their paths gained a frontend/ segment:
EXT:academic_study_plan/Resources/Public/Css/academic-study-plan.css
-> EXT:academic_study_plan/Resources/Public/Css/frontend/academic-study-plan.css
EXT:academic_study_plan/Resources/Public/JavaScript/academic-study-plan.js
-> EXT:academic_study_plan/Resources/Public/JavaScript/frontend/academic-study-plan.js
The script is now an ES module. It is registered in
Configuration/ and addressed by the bare specifier
@fgtclb/.
The TypoScript include Configuration/
has been removed. It added both files to every page of the site through
page. and
page.. There is
no TypoScript counterpart for loading an ES module, so both assets are now
loaded by the plugin template instead — which also means they are only
requested on pages that actually render a study plan.
Impact
An installation that uses the extension as shipped needs to do nothing: the template loads what it needs.
An installation that referenced either file by path, or that imported the removed TypoScript include, no longer gets the assets.
Affected installations
Installations that override Academic, that import
Includes/ from their own TypoScript, or that reference
either asset path from a site package.
Migration
Remove any import of the deleted TypoScript include and drop your own
include or
include entries for these
files.
In an overridden template, load them the way the shipped one does:
<f:asset.css identifier="academicStudyPlan" href="EXT:academic_study_plan/Resources/Public/Css/frontend/academic-study-plan.css" />
<f:asset.module identifier="@fgtclb/academic-study-plan/frontend/academic-study-plan.js" />
<f: cannot be used for the script any more — a classic
script tag does not execute an ES module.