Breaking: The study plan icons are renamed and the controls are frontend icons 

Description 

In 2.4 the study plan registered seven icons in Configuration/Icons.php, for the icon registry of the TYPO3 backend: the icon of the content element, the record icons of categories, semesters and modules, and the three control icons of the frontend, the plus and the minus glyph of a semester header and the close glyph of a module dialog. Version 2.3 registered only the first four and asked for control icons nobody registered. The template rendered the controls with core:icon.

The academic extensions now draw every icon from one set, Font Awesome Free (solid), drawn in currentColor so each icon takes the colour of the surrounding text, in both backend colour schemes and in the frontend (ACE-593). The identifiers follow the scheme tx-<extension key without underscores>-<group>-<name>, and the group decides the registry:

  • The content element icon and the three record icons are shown by the backend only. They stay in Configuration/Icons.php under new identifiers. The content element icon was a placeholder drawing in fixed colours, and now follows the colour scheme like the record icons.
  • The three controls are shown by the frontend only. They are no longer registered by this extension: the partials Frontend/Default/Partials/StudyPlan/Semester.html and Frontend/Default/Partials/StudyPlan/ModuleDialog.html render the shared action icons of academic_base from its frontend icon registry, with the ab:icon ViewHelper of academic_base and the arguments they had (ACE-813).

The previous identifiers are removed without an alias:

2.x identifier 3.0 identifier Registry
academic-study-plan tx-academicstudyplan-plugin-study-plan Configuration/Icons.php
academic-study-plan-category tx-academicstudyplan-record-category Configuration/Icons.php
academic-study-plan-semester tx-academicstudyplan-record-semester Configuration/Icons.php
academic-study-plan-module tx-academicstudyplan-record-module Configuration/Icons.php
academic-study-plan-plus tx-academicbase-action-expand Configuration/FrontendIcons.php of academic_base
academic-study-plan-minus tx-academicbase-action-collapse Configuration/FrontendIcons.php of academic_base
academic-study-plan-close tx-academicbase-action-close Configuration/FrontendIcons.php of academic_base

The files content-element.svg, category.svg, semester.svg, module.svg, plus.svg, minus.svg and close.svg in Resources/Public/Icons/ are removed. The new files live in Resources/Public/Icons/plugin/ and Resources/Public/Icons/record/. Resources/Public/Icons/Extension.svg stays, as the extension icon only. The origin and licence of the Font Awesome files (CC BY 4.0) are listed in Resources/Public/Icons/LICENSE-font-awesome.txt.

The controls are still inlined SVG. The files of 2.x carry a viewBox but no width and height , and an inline SVG without a size collapses to 0 pixels inside the flex header of a semester and inside the close button of a dialog. Only the stylesheet 2.4 shipped made them visible, see Important: The study plan controls are visible. The new files carry width="1em" height="1em" and keep that size without a stylesheet, which this version no longer ships, see Breaking: The study plan ships no stylesheet.

Impact 

  • An icon requested with one of the previous identifiers renders a not-found placeholder: in TCA, page TSconfig and through IconFactory::getIcon() the one of TYPO3, with ab:icon the one of academic_base. A site package that registers one of the previous identifiers in its Configuration/Icons.php or Configuration/FrontendIcons.php no longer changes anything.
  • An override of Semester.html or ModuleDialog.html that renders a control with core:icon shows TYPO3's not-found icon, because the icon registry of the backend does not know the identifiers of the frontend icon registry.
  • The class the icon markup derives from the identifier changes with it. The stylesheet example of Style the element switches the glyphs of a semester header through icon-tx-academicbase-action-expand and icon-tx-academicbase-action-collapse , and hides .icon in the header on a wide viewport. A site stylesheet or an override that still uses icon-academic-study-plan-plus or icon-academic-study-plan-minus shows both glyphs, or neither.
  • A replacement of a control is no longer limited to the study plan. Its identifier belongs to academic_base, so a site package that replaces it changes the glyph in every academic extension that renders it.

Affected Installations 

Every installation whose site package replaces one of the icons, names one of the previous identifiers in TCA or page TSconfig, overrides one of the two partials, or styles the generated icon-* classes. Installations that use the extension as shipped need no change.

Migration 

  1. Replace the previous identifiers with the 3.0 identifiers from the table above, in TCA overrides, page TSconfig and overridden templates.
  2. To draw the content element or a record icon differently, register its 3.0 identifier in the Configuration/Icons.php of the site package.
  3. To draw a control differently, register its 3.0 identifier in the Configuration/FrontendIcons.php of the site package, not in its Configuration/Icons.php. The file has the format of Icons.php. The site package has to depend on academic_base, which registers the control icons, so its entry is read after the shipped one:

    EXT:mysitepackage/Configuration/FrontendIcons.php
    <?php
    
    use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
    
    return [
        'tx-academicbase-action-close' => [
            'provider' => SvgIconProvider::class,
            'source' => 'EXT:mysitepackage/Resources/Public/Icons/close.svg',
        ],
    ];
    Copied!
  4. In an override of Semester.html or ModuleDialog.html, render the controls with <ab:icon instead of <core:icon, keep every argument, and declare the namespace in the <html> tag of the partial: xmlns:ab="http://typo3.org/ns/FGTCLB/AcademicBase/ViewHelpers". An override of Semester.html keeps rendering tx-academicbase-action-expand and tx-academicbase-action-collapse when the site stylesheet selects their classes, as the example of the manual does, see The glyphs of a semester header.
  5. Replace .icon-<2.x identifier> selectors with .icon-<3.0 identifier> .
  6. Flush the TYPO3 caches, so the icon registries and the Fluid template cache are rebuilt.