Breaking: Section-based AcademicPersons settings
See also
Upgrading from 2.4 to 3.0.0 is the order in which the 3.0 changes have to be applied.
Description
Configuration/ changes shape. The flat
schema of two top-level maps -
profile listing the
seven timeline entry types, and
validations
with one flag list per
record type - could say which fields are required or locked, and nothing
else. The editing frontend of
fgtclb/academic-persons-edit
needs
the order of the fields, the control each one is rendered with, its help
text, the rows and actions of a sortable list, and the character limit of a
rich text field. All of that is now declared in one place, in four top-level
maps:
profile
,
special
,
contracts
and
document. The
Profile sections page documents the shape,
the Validation settings page the flags.
There is still one file, one factory and one cache entry. The public
detail layout -
structure
and
details
- lives in the same
profile
map as the editable fields, so an override of the layout
restates the fields with it. The backend TCA does consume the graph: five
TCA files of this extension merge the validation set of their own section,
exactly as they merged the flat sets before, and the sixth - the profile
information table, one table shared by the seven timeline types - merges a
types
fragment so a section's flags land in the
columns of its own record type. The normalised graph is cached in
the core cache under AcademicPersons_Settings_v3, the identifier the move
of the validation primitives to EXT: introduced in the same
release; it is not changed a second time.
What an integrator sees:
-
profileis gone. The seven relations of a profile to its timeline entries (Informations Types scientific_,research vita,memberships,cooperation,publications,lectures,press_) are part of the domain model and are declared by the TCA file of the profile table. They used to be generated from the map, so an override that dropped an entry silently lost a backend column; they now exist whatever the settings say. The same seven appear asmedia document, which carry their label, record type, relation field, row fields, actions and validators.Sections The record type and the relation field of a timeline type are no longer configurable. They used to be one value each, generating the backend column and selecting the frontend records together; since the column is TCA, a changed
typeorfieldwould move the frontend half alone and every record created through it would be invisible in the backend. An override of either is therefore not applied, and the legacy mapping reports it per key instead of copying it, see Feature: Legacy settings overlay and migration command. A timeline type of a project's own needs its own column in a TCA override of the profile table, and aName documententry that names it.Sections validationsis gone. The flags of a field are declared on the field:profile.<field>.for the profile,validators contracts.for the contract,fields.<field>. validators contracts.for the address, email and phone records, andcontact Sections.<section>. fields.<field>. validators documentfor the timeline entries. Every set keeps to its own section: a timeline section reaches the backend asSections.<section>. validators.<field> columnsOverridesof its record type, never as a column configuration all seven types share.- The flag vocabulary grows by
url,tel,textareaandhtml, and a rich text field can carry acharacter.Limit fieldandType renderdescribe the frontend control only; the TCA column keeps the type its TCA file declares.Type - The shipped flags change, and both editing contexts apply that. Newly
required: the profile's
gender- the profile TCA column getsrequiredandminitems, so the backend record editor refuses to save a profile without a gender, and the editing frontend runs its not empty validation - and the contract'svalid. Newly validated:From website,publicationsand theLink linkof six of the seven timeline sections carry theurlflag -cooperationoffers no link field and therefore no flag on one. Relaxed: thetypeof an email address or phone number is no longer required, and the address'sstreetandNumber ziplose thenumberflag - their columns return from thenumberTCA type the flag set to theinputtheir TCA file declares, so a street number like12ais stored as entered instead of being cast to12. Unchanged: the address'scountry, and thetitleandyearof every timeline entry were required before. - The timeline entry validators address the year columns:
yearis the record's year, and the keysfromandtoalias itsyearandStart yearproperties.End - Every field of the shipped file carries a
helptext, and the label file of academic_persons gains the 38helptext.*units they reference - the help of the profile, contract, contact and timeline fields, rendered by the editing frontend. A project replaces the text either by pointinghelptextat anLLL:key of its own (or at literal text), or by overriding the shipped unit throughlocallang.XMLOverride
The internal PHP API changes with the file.
Academic
exposes the graph -
profile,
special,
contract,
contract,
document and
public - built from the new value
objects
Profile,
Profile,
Special,
Contract,
Contract,
Contract,
Document and
Public, and answers validation questions per section.
Removed without replacement:
| Removed | Instead |
|---|---|
\FGTCLB\ |
Document, resolved through
Academic or
get |
Academic |
get |
Academic,
get |
get,
get,
get and
get, plus
get and
get for a subset
of a section's fields - every one of them returns an empty set
for an unknown identifier, there is no separate fallback method |
Academic,
$validations
| the graph properties above |
All of it is
@internal
and was consumed by EXT:
only, which is adapted.
Impact
Every site package that overrides the file has to be migrated. The old
maps are not read as such any more. A file that still declares
validations
or
profile is mapped onto the
section maps at runtime with a logged warning, until 4.0 - see the Feature
entry on the legacy settings overlay and the migration command, and the
migration section of the
validation settings page. Without that mapping the installation would run on
the shipped defaults: locked name fields, the required contact fields, and the
seven shipped timeline sections.
An eighth timeline entry type that an override declared under
profile used to get a backend inline column for free.
It no longer does: the profile relations are fixed. Such a type can be kept by
declaring the column in a TCA override of the profile table and its section
under
document - the TCA file's loop over the seven relations
is the template for the column. The Extbase model of this extension never had
a property for an additional type, so it was reachable in the backend only.
Code that reads the removed methods or the removed class fails with an undefined method or a class not found error.
Existing profiles without a gender can no longer be saved in the backend until a gender is chosen, and a frontend profile form that does not post one is rejected. An installation that does not want the gender required removes the flag in its override. Street numbers and zip codes accept non-numeric values again; values already cast to integers stay as they are.
Affected Installations
Every installation with a site package shipping
Configuration/, and every installation
whose project code reads
Academic directly.
Migration
- Copy the shipped
EXT:over the override in the site package, and re-apply the project's changes to it: a locked or unlocked profile field is itsacademic_ persons/ Configuration/ Academic Persons/ Settings. yaml validatorslist underprofile, a required contact field its list undercontracts., a required timeline field its entry under thecontact Sections validatorsmap of every section it applies to. - Keep every map the override declares complete. The files are merged on
the top level only, so a
profilemap in the override replaces the shipped one - the layout keys and every field included. - Decide on the changed defaults: drop
requiredfromprofile.if profiles without a gender are to stay saveable, restoregender. validators numberonstreetandNumber zipif numeric values are to be enforced, and addrequiredback to the two<section>Typefields if a contact type is mandatory. - Re-declare a renamed timeline relation in TCA. An override that changed
profileorInformations Types.<type>. type ...no longer reaches the profile table, and the value it named is reported byfield Name vendor/rather than applied. Either accept the shipped record type and relation, or declare the column in a TCA override ofbin/ typo3 academic: persons: settings: migrate tx_and give it aacademicpersons_ domain_ model_ profile documententry.Sections - Flush all TYPO3 caches.