Breaking: Profile editing renders the shared icon set
Description
The action and state icons of the profile editor and the profile overview are
shown in the frontend only. Up to now this extension registered them itself,
under academic- identifiers in
Configuration/Icons.php, for the icon registry of the TYPO3 backend,
and the templates rendered them with core: (ACE-812, ACE-586).
The editor now renders the shared action and state icons of
academic_base. They are frontend icons, registered in the
Configuration/ of academic_base for its
frontend icon registry, and the thirteen templates and partials that render
them use the ab: ViewHelper of academic_base, with the
arguments they had: Templates/,
Templates/ and, below Partials/,
Button, Prototypes.,
Field/, Field/,
Field/, Field/,
Field/, Documents/,
Documents/, Documents/ and
Image/. This extension registers no frontend icon of its own.
The icon of the content element is renamed as well and stays in
Configuration/Icons.php, the only entry there.
Every identifier is renamed without an alias. The old ones are registered in neither registry any more:
| Removed identifier | 3.0 identifier | Registry |
|---|---|---|
persons_ | tx- | Configuration/ of this extension (backend) |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
Of the removed identifiers, persons_ and
academic-, -delete, -edit, -save and -view
shipped with 2.x. The others only existed during the development of 3.0.
The 2.x identifiers academic-, -add-,
-cancel, -sort and -to- went with the form flow they belonged
to and have no successor, see Breaking: Replaced the profile editing view.
The files of the removed identifiers are deleted from
Resources/, together with
LICENSE-. The shared icons and the new content
element icon are Font Awesome Free solid icons (CC BY 4.0), with their notice
in Resources/ of the extension
that ships the file.
Every icon is drawn in current and registered with
\FGTCLB\,
which inlines the <svg> where the
Svg of TYPO3 rendered
an <img> in 2.x. A glyph of the editor takes the colour of the control it
sits in, and the content element icon follows the backend colour scheme in the
page module and the new content element wizard instead of keeping a fixed red.
The drawings change with the identifiers. Two of them change in kind rather
than in style: the drag handle is a set of horizontal lines instead of a grid
of dots, and the help icon is a question mark in a circle instead of an i.
Impact
None of the following shows an error:
- A template override, PHP code or a site stylesheet or script that names a
removed identifier gets TYPO3's not-found icon, or matches nothing. The
rendered markup names the identifier twice, as
data-and in theidentifier icon-<identifier>class on the wrapper, so a selector such as.icon-oracademic- persons- edit- save [data-stops matching.identifier="academic- persons- edit- save"] - A site package that replaced one of the editor icons, in its
Configuration/Icons.phpor itsConfiguration/, sees the shipped drawing again.Frontend Icons. php - An override of one of the thirteen files that renders an action icon with
core:shows TYPO3's not-found icon in its place, because the icon registry of the backend does not know the shared icons. Three of the files hold the templates the editor clones in the browser:icon Prototypes.(the help button of a field),html Documents/(the add control of a contact section and the six controls of a contact row) andContract Contacts. html Button(the edit button of a field without a value). An override of one of those clones the not-found icon into every control it builds.Templates. html - Page TSconfig or TCA of a project that names
persons_, for example in a new content element wizard entry of its own, shows the not-found icon.edit_ icon - A site stylesheet that selects the icons as
.t3js-no longer matches them.icon img
Apart from the identifier in data- and in the class, the
rendered markup of the editor icons keeps its classes and attributes, so a
site stylesheet that selects them by those classes needs no change. Neither do
the controls the editor builds in the browser.
Affected Installations
Every installation whose site package replaces one of the editor icons or the content element icon, overrides one of the thirteen files, or names one of the removed identifiers in a template, PHP code, page TSconfig, TCA, a stylesheet or a script of its own. Installations that use the shipped templates as they are need no change.
Migration
- Replace every removed identifier with its 3.0 identifier from the table above, in template overrides, PHP code, page TSconfig, TCA, and CSS and JavaScript selectors.
- Move a replacement of one of the editor icons to the
Configuration/of the site package, under theFrontend Icons. php tx-identifier. The file has the format ofacademicbase-* Icons., and the site package has to depend on academic_base, so its entry is read after the shipped one. Replacing an icon has an example. The identifier is shared by every academic extension, so the replacement changes the icon wherever the action or state appears, not only in the profile editor.php - Move a replacement of the content element icon to the
Configuration/Icons.phpof the site package, undertx-.academicpersonsedit- plugin- profile- editing - In an override of one of the thirteen files, render the icons with
<ab:instead oficon <core:, keep every argument, and declare the namespace in theicon <html>tag of the file:xmlns:. Keep theab="http:// typo3. org/ ns/ FGTCLB/ Academic Base/ View Helpers" data-andpe- view- icon data-wrappers around the eye and visibility icons, the editor switches between the two icons of a control through them. An icon of the project in the same file either stays onpe- visibility- icon core:or is registered in theicon Configuration/of the site package and rendered withFrontend Icons. php ab:too.icon - Style the inlined
<svg>rather than an<img>. - Flush the TYPO3 caches, so the icon registries and the Fluid template cache are rebuilt.