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'
Copied!

A project that requires branch 2 as 2.x-dev keeps an inline alias such as 2.x-dev as 2.4.x-dev 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/sysext/core/bin/typo3 instead of vendor/bin/typo3 .

vendor/bin/typo3 cache:flush
Copied!

Update the database 

vendor/bin/typo3 extension:setup
Copied!

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
Copied!

The wizard Remove content elements of the removed academic_persons_edit profile switcher plugin, academicPersonsEdit_removeProfileSwitcherContent, 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_profileswitcher, and as a legacy plugin with the list_type 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. academicPersonsEdit_pluginContent, 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/bin/typo3 upgrade:mark:undone academicPersonsEdit_removeProfileSwitcherContent. 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/academic-persons-edit keeps its name and delivers the page TSconfig.

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.tt_content.CType.keepItems , is not repaired. Its record history shows the former type.

Static templates and imports 

The static template of version 2.3, stored as EXT:academic_persons_edit/Configuration/TypoScript, 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_template record with Academic Persons Edit: All components (academic_persons_edit), or on TYPO3 13 depend on the set fgtclb/academic-persons-edit 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/TypoScript/ProfileEditing/ instead. Configuration/TSconfig/page.tsconfig and the files below Configuration/Sets/AcademicPersonsEdit/ were removed. Their content is in Configuration/TSconfig/ProfileEditing/page.tsconfig and in the set folders Configuration/Sets/Full/ and Configuration/Sets/ProfileEditing/. 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:

TypoScript constants
plugin.tx_academicpersonsedit.renderContentElementHeader = 1
Copied!

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 =
Copied!

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.tx_academic_persons_edit._LOCAL_LANG , or for the options of the select fields under plugin.tx_persons_edit._LOCAL_LANG , no longer has an effect. Move it to plugin.tx_academicpersonsedit._LOCAL_LANG , or to the path of the one plugin it is meant for. See Important: Label overrides are read from the documented path and Labels.
  • The e-mail address field reads the units emailAddress.email.label and emailAddress.email.placeholder . An override or a further translation keyed on emailAddress.emailAddress.label or emailAddress.emailAddress.placeholder uses the new ids. See Important: The e-mail address field has a label.
  • A validation message override keyed form.<field>.error.<code> was never shown. Key it <formObject>.<field>.error.<code> , for example emailAddressFormData.email.error.1221559976 . See Important: Rejected forms show their messages.
  • The backend labels of the relation between frontend users and profiles moved into academic_persons. An override of them through $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'] targets the file of that extension now, as its upgrade chapter describes.

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 AcademicPersonsEdit now instead of academic_persons_edit , 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/Private/:

File What changed Entry
Layouts/ProfileEdit.html Renders the header of the content element only when renderContentElementHeader 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/Contract/Show.html, Partials/Profile/List/PhysicalAddresses.html, Partials/Profile/List/EmailAddresses.html, Partials/Profile/List/PhoneNumbers.html Iterate the new variables {physicalAddresses} , {emailAddresses} and {phoneNumbers} , which contain hidden records, and render the show and hide toggle. Breaking: Adapted frontend editing templates for contact record visibility
Templates/Profile/Edit.html Loads the editor configuration from Resources/Public/JavaScript/frontend/ckeditor.js, see the asset below. Breaking: The editor configuration moved
Templates/Contract/New.html, Templates/Contract/Edit.html, Partials/Profile/Properties/Profile.html, Partials/Profile/Properties/Contract.html 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/Profile/Show/Image.html Reads the image metadata through originalResource , 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/Profile/Forms/Errors.html, Partials/Profile/Forms/FieldWrapper.html, the new Partials/Profile/Forms/ErrorMessage.html, 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/Profile/Show/Personal.html 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/Profile/Buttons/*.html, Partials/Profile/Forms/Textarea.html, Partials/Profile/Forms/Textfield.html, Partials/Profile/List/Contracts.html, Partials/Profile/List/ProfileInformation.html, 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:academic_persons_edit/Resources/Public/JavaScript/CKEditor.js EXT:academic_persons_edit/Resources/Public/JavaScript/frontend/ckeditor.js

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 AbstractFormData::setPropertyOverride() , otherwise it is not applied. See Important: Form data transformation only maps submitted fields.

Check the result 

  1. 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.
  2. No profile switcher content element is left, and the page module shows no element with an invalid type in its place.
  3. The header of a profile editing content element appears once.
  4. The rich text fields of the profile form and of the contract forms start the editor, and the editor offers links.
  5. 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.
  6. A rejected form shows the message at the rejected field.
  7. A profile image of an accepted media type uploads, and the profile view of the plugin renders it.