Upgrading from 2.3 to 2.4
Two changes of version 2.4 need attention on every site: the profile editing content element is hidden in the backend until the site includes the page TSconfig of its component, and most of the Fluid files of the plugin changed, so every override has to be compared with them. Work through the sections in order. Skip a step that does not apply to the installation.
Before you start
Version 2.4 runs on TYPO3 12.4 from 12.4.22 on and on TYPO3 13.4, with PHP 8.1 or later. That is the same as for 2.3, so the TYPO3 core does not have to change for this upgrade.
academic_persons_edit 2.4 declares no new dependency of its own. It needs these packages. Upgrade them first or in the same deployment, in this order:
- fgtclb/environment-state-manager 1.x, new in 2.4, which academic_base 2.4 and academic_persons 2.4 require. Composer installs it on its own. A classic installation installs environment_state_manager before it activates either of them.
- fgtclb/academic-base 2.4, the same release as this extension.
- fgtclb/academic-persons 2.4, the same release as this extension. Its upgrade chapter has steps of its own, and its database update and its upgrade wizard are due in the same deployment.
academic_persons_sync 2.4 requires this extension and follows it in the same deployment, where installed.
Update the package
composer require -W \
'fgtclb/academic-base':'~2.4.0' \
'fgtclb/academic-persons':'~2.4.0' \
'fgtclb/academic-persons-edit':'~2.4.0'
A project that requires branch 2 as 2. keeps an inline alias such
as 2. working, see Important: The development branch installs as 2.4.x-dev.
On a classic installation, install environment_state_manager 1.x
from the TER in Admin Tools > Extensions first, then update
academic_base, academic_persons and
academic_persons_edit there, in this order. Run the commands of
this page with
typo3/ instead of
vendor/.
vendor/bin/typo3 cache:flush
Update the database
vendor/bin/typo3 extension:setup
In the backend the same is Admin Tools > Maintenance > Analyze Database Structure. Version 2.4 of this extension changes no table. Run the update all the same, academic_persons 2.4 adds a column, and the upgrade wizard of the next step requires an up to date schema.
Run the upgrade wizards
vendor/bin/typo3 upgrade:run academicPersonsEdit_removeProfileSwitcherContent
The wizard Remove content elements of the removed
academic_persons_edit profile switcher plugin,
academic, is new in 2.4. The profile
switcher has rendered nothing since version 2.1, which replaced it, but its
content type stayed registered. Version 2.4 removes the content type, and the
wizard sets every content element of it to deleted, in both shapes it can have:
with the
CType
academicpersonsedit_, and as a legacy
plugin with the
list_ of that name. The records stay restorable from
the recycler. See Breaking: Removed the profile switcher plugin, which also has the queries to look
at the affected records first.
The wizard can run in any order with the other wizards.
academic, which shipped with 2.3 already, no longer
moves a profile switcher onto its own content type, so whether it ran before
does not matter. An installation that never used the profile switcher gets
nothing to do from the wizard.
Once TYPO3 has recorded a wizard as done, it is offered again only after it is
marked undone. TYPO3 13 marks a wizard undone with
vendor/.
TYPO3 12 has no such command: open
Admin Tools > Upgrade > Upgrade Wizard, find the wizard under
Wizards marked as done and choose Mark undone.
Adapt the configuration
Make the content element selectable
The site set and the static template were cut per component, and the Profiles: Profile Editing content element is now hidden for the whole installation until the page TSconfig of its component brings it back. See Breaking: Site sets and static templates have been restructured for the complete change.
- TYPO3 12, and TYPO3 13 without a site set: add Academic Persons Edit: All components (academic_persons_edit) in the page record of every site root that offers profile editing, tab Resources, field Include static Page TSconfig (from extensions), see Include static page TSconfig. This entry did not exist in 2.3. Without it the content element is no longer offered in the backend, and on TYPO3 12 the new content element wizard has no entry for it.
- TYPO3 13 with a site set: nothing to do. The set
fgtclb/keeps its name and delivers the page TSconfig.academic- persons- edit
Use one mechanism per site, never a site set and a static template together, see Do not combine both.
Existing content elements keep rendering in the frontend either way. The
breaking change entry warns that saving such a content element in the backend,
on a page that does not include the page TSconfig of its component, writes
another content type. That no longer happens in 2.4.0:
academic_base 2.4 keeps the stored type selected and labels it
(not enabled on this page), so saving the record keeps it. A content
element whose type was already replaced before the update, for example on a
page that restricted the content types with
TCEFORM., is not repaired. Its record
history shows the former type.
Static templates and imports
The static template of version 2.3, stored as
EXT:, keeps delivering. It is
offered as Academic Persons Edit: Path up to 2.3 (deprecated, use
All components) now and will be removed in version 4.0. Replace it in the
field Include TypoScript sets on the tab Advanced
Options of the
sys_ record with Academic Persons
Edit: All components (academic_persons_edit), or on TYPO3 13 depend on the
set fgtclb/ instead. See
Deprecation: The static template path of version 2.3.
The same holds for an
@import
of
Configuration/TypoScript/constants.typoscript or
Configuration/TypoScript/setup.typoscript in a site package: it keeps
working and is deprecated. Import the files of
Configuration/ instead.
Configuration/ and the files below
Configuration/ were removed. Their content is
in Configuration/ and in the set
folders Configuration/ and
Configuration/. An
@import
of a
missing file fails silently and shows up as missing configuration.
The header of the content element
The layout of the plugin no longer renders the header and the subheader of the content element. They appeared twice where the content element layout of the site renders them as well, which the layouts of EXT:fluid_styled_content and of the bootstrap package do.
A site whose content element layout renders no header switches the header of the plugin on:
plugin.tx_academicpersonsedit.renderContentElementHeader = 1
See Important: The profile editing plugin leaves the content element header to the layout.
The profile image upload
An empty list of accepted media types now accepts a profile image of any media type, where it rejected every upload before:
plugin.tx_academicpersonsedit.settings.editForm.profileImage.validation.allowedMimeTypes =
A site that emptied or removed the setting and wants to restrict the uploads lists the accepted media types there. See Important: An empty mime type list accepts every upload.
On TYPO3 12 the profile image is rendered as WebP only where the installation allows TYPO3 to produce WebP, see Important: Profile image keeps its own format where WebP is not allowed.
Labels
- A label override under
plugin., or for the options of the select fields undertx_ academic_ persons_ edit._ LOCAL_ LANG plugin., no longer has an effect. Move it totx_ persons_ edit._ LOCAL_ LANG plugin., or to the path of the one plugin it is meant for. See Important: Label overrides are read from the documented path and Labels.tx_ academicpersonsedit._ LOCAL_ LANG - The e-mail address field reads the units
emailandAddress. email. label email. An override or a further translation keyed onAddress. email. placeholder emailorAddress. email Address. label emailuses the new ids. See Important: The e-mail address field has a label.Address. email Address. placeholder - A validation message override keyed
form.<field>.was never shown. Key iterror.<code> <form, for exampleObject>.<field>. error.<code> email. See Important: Rejected forms show their messages.Address Form Data. email. error. 1221559976 - The backend labels of the relation between frontend users and profiles
moved into academic_persons. An override of them through
$GLOBALStargets the file of that extension now, as its upgrade chapter describes.['TYPO3_ CONF_ VARS'] ['SYS'] ['locallang XMLOverride']
Adapt templates and assets
An override keeps its own copy and does not receive a change of the shipped
file. Version 2.4 changes 35 of the Fluid files of the plugin, and nearly all
of them translate their labels with the extension name
Academic now instead of
academic_, which
moves the path of a label override, see Labels.
Re-apply each override on top of the 2.4 file.
Breaking: Adapted frontend editing Fluid files lists every change, and
Overriding templates describes how the overrides are set up.
The changes beyond the label path follow. The paths below are relative to
Resources/:
| File | What changed | Entry |
|---|---|---|
Layouts/ | Renders the header of the content element only when
render is switched on, see
The header of the content element. A copy drops the header
render where the site layout renders the header, or wraps it in
the same condition. | Important: The profile editing plugin leaves the content element header to the layout |
Templates/,
Partials/,
Partials/,
Partials/ | Iterate the new variables
{physical,
{email and
{phone, which contain
hidden records, and render the show and hide toggle. | Breaking: Adapted frontend editing templates for contact record visibility |
Templates/ | Loads the editor configuration from
Resources/, see the
asset below. | Breaking: The editor configuration moved |
Templates/,
Templates/,
Partials/,
Partials/ | Start the rich text editor on TYPO3 12 and in the contract forms:
the contract templates load the editor, the partials pass
richtext: 1
instead of
richtext: true
. | Important: The profile forms now start the rich text editor |
Partials/ | Reads the image metadata through
original, no
longer renders the copyright block, and requests WebP only where
the installation allows it. | Important: Adapted profile image partial, Important: Profile image keeps its own format where WebP is not allowed |
Partials/,
Partials/, the new
Partials/, and the
templates of the six forms | Show the message of a rejected field at the field. The templates pass the name of their form object to the errors partial as a string. | Important: Rejected forms show their messages |
Partials/ and the headers of the
templates | Leave out an empty title and middle name of the profile name. | Breaking: Adapted frontend editing Fluid files |
All other changed files: Partials/,
Partials/,
Partials/,
Partials/,
Partials/, the other
templates below Templates/ | The label path, and the changes of the rows above where the file belongs to the forms. | Important: Label overrides are read from the documented path |
One asset moved. The editor configuration is compiled from TypeScript now:
| Old path | New path |
|---|---|
EXT: | EXT: |
A template copy or a site package that references the old path loads a missing file, and the rich text fields fall back to plain text areas. See Breaking: The editor configuration moved. A site package that shipped an editor configuration of its own only to get a link button can drop it, the shipped one has one now, see Important: Links and readable markup in the frontend editor.
Adapt your code
The form data transformation now writes only the properties a form submitted.
Code that extends or replaces the internal form data classes or their
factories, and sets a property the form did not submit, registers the value
with
Abstract, otherwise it is not
applied. See Important: Form data transformation only maps submitted fields.
Check the result
- The new content element wizard offers Profiles: Profile Editing on the pages that should have it, and an existing profile editing content element opens in the backend with its own type.
- No profile switcher content element is left, and the page module shows no element with an invalid type in its place.
- The header of a profile editing content element appears once.
- The rich text fields of the profile form and of the contract forms start the editor, and the editor offers links.
- A frontend user can edit each of its profiles. The editor accepts only profiles the frontend user is linked to in the default language of the profile, a link set only on a translation is ignored. See Important: The editor is limited to own profiles.
- A rejected form shows the message at the rejected field.
- A profile image of an accepted media type uploads, and the profile view of the plugin renders it.