Important: The timeline year fields are constrained
Description
The three year columns of
tx_ -
year
,
year_ and
year_ - declared
'config' => [
'type' => 'number',
'min' => 0,
'max' => 9999,
'nullable' => true,
],
and enforced none of it.
min
and
max
are options of the
TCA type
input
; the type
number
reads its bounds from
range
alone. So the backend form rendered a number field without an
HTML
min
or
max
attribute, and
Data clamped
nothing on save.
The three columns now declare
'config' => [
'type' => 'number',
'format' => 'integer',
'range' => [
'lower' => 0,
'upper' => 9999,
],
'nullable' => true,
],
which is what renders the HTML bounds and what
Data clamps a
submitted value against; ext_ declares the three columns
int(11) unsigned DEFAULT NULL, what the corrected TCA derives. The
palette, the labels, the property names and the frontend rendering are
unchanged.
Impact
The backend record editor now keeps a year within 0-9999: a value
above the upper bound is clamped to 9999 on save, a negative one to 0.
NULL
stays the empty value.
ext_ declares the three columns as
int, matching what the corrected TCA derives.
The database analyzer therefore offers the change of signedness. An
installation that stored a negative year - which nothing in the extension ever
wrote - has to correct those rows before applying it.
Affected Installations
Every installation of fgtclb/academic-persons that edits profile information records in the TYPO3 backend.