Important: #103915 - Adjust database field defaults for "check" TCA types
See forge#103915
Description
TYPO3 v13.0 has introduced automatic database field creation for TCA
fields configured as type "check" (if not explicitly defined in
ext_
), via
https://review.typo3.org/c/Packages/TYPO3.CMS/+/80513.
This conversion applied a
default 0
to all fields, and did not
evaluate the actual TCA definition for the
['config']
setting.
This bug has been fixed, and the DB schema analyzer will now convert all the following fields to their proper default settings:
be_
(0->3)users. options sys_
(0->1)file_ storage. is_ browsable sys_
(0->1)file_ storage. is_ writable sys_
(0->1)file_ storage. is_ online sys_
(0->1)file_ storage. auto_ extract_ metadata sys_
(0->1)file_ metadata. visible tt_
(0->1)content. section Index tx_
(0->1)styleguide_ palette. palette_ 1_ 1 tx_
(0->1)styleguide_ palette. palette_ 1_ 3 tx_
(0->1)styleguide_ valuesdefault. checkbox_ 1 tx_
(0->1)styleguide_ valuesdefault. checkbox_ 2 tx_
(0->5)styleguide_ valuesdefault. checkbox_ 3 tx_
(0->5)styleguide_ valuesdefault. checkbox_ 4 sys_
(0->3)workspace. edit_ allow_ notificaton_ settings sys_
(0->2)workspace. edit_ notification_ preselection sys_
(0->3)workspace. publish_ allow_ notificaton_ settings sys_
(0->1)workspace. publish_ notification_ preselection sys_
(0->3)workspace. execute_ allow_ notificaton_ settings sys_
(0->3)workspace. execute_ notification_ preselection sys_
(0->3)workspace_ stage. allow_ notificaton_ settings sys_
(0->8)workspace_ stage. notification_ preselection
All these records, created via
Data
calls, actually
evaluate the TCA default for record insertion and do not rely
on SQL database field defaults.
Only records created using the
Query
or
other "raw" database calls would apply the wrong
values.
An example of this is
TYPO3\
which creates a default fileadmin
record via the
Query
and then sets the field
auto_
to
0
, instead of 1
as would be expected in the TCA. This would mean YouTube files would not
automatically fetch metadata on creation.
This means, for all custom extension code that
- removed the column definition in
ext_
to enforce automatic database field creation,tables. sql - and did not use the recommended
Data
for record insertion (so, any code that is not executed in the backend context, usingHandler Query
or Extbase repository methods),Builder - and expects a different default than
0
for newly created records, - and relied on the database field definition default
this code may have created incorrect database records for versions between TYPO3 v13.0 and 13.2.
For TYPO3 Core code, this has only affected:
- Default file storage creation, field
sys_
file_ metadata. auto_ extract_ metadata - Default backend user creation (admin) property
be_
users. options
In these rare case, the database record integrity needs to be checked manually, because there are no automated tools to see if a record has used SQL default values or specifically defined values.