#111013TCA default values of fields outside the type's showitem are no longer applied
Description
Problem
Since #101435 (commit 4930c561853) DataHandler takes the fields of a new record from the type-specific sub-schema. A sub-schema only contains the fields of the type’s showitem.
As a result, newFieldArray() no longer sets the TCA default value of a column that is not part of the record type’s showitem. The record gets the SQL column default instead. In 13.4 newFieldArray() went through all columns of the table.
Affected: main and 14.3.
How to reproduce
Functional test, tt_content on a page with uid 1:
$GLOBALS['TCA']['tt_content']['columns']['imageborder']['config']['default'] = 1;
$this->get(TcaSchemaFactory::class)->rebuild($GLOBALS['TCA']);
$dataHandler->start(['tt_content' => ['NEW1' => ['pid' => 1, 'CType' => 'text', 'header' => 'test']]], [], $backendUser);
$dataHandler->process_datamap();
Expected: imageborder = 1
Actual: imageborder = 0 (imageborder is not in the showitem of CType “text”)
Same result without “CType” in the data, because the default type is used then.
Related
#104646: a columnsOverrides default for a passthrough field works since #101435 when the field is in the type’s showitem.
Proposal
newFieldArray() goes through all columns of the table again and uses the sub-schema field where the type overrides it. The other places that use the sub-schema fields (copy, uniqueInPid, uniqueInSite) are not touched.
Reviews 2
Related issues 1
History 36
-
Gerrit Code Review pushed patch set 1 for main to change 96603 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-11T06:14:58+00:00" > 10/11/26, 06:14 </span> -
Wolfgang Klinger changed Related to #104646 <span data-processor="relativetime" data-value="2026-10-11T06:16:29+00:00" > 10/11/26, 06:16 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 96603 <span data-processor="relativetime" data-value="2026-10-11T09:29:23+00:00" > 10/11/26, 09:29 </span>
-
Wolfgang Klinger changed assigned to Wolfgang Klinger <span data-processor="relativetime" data-value="2026-10-11T10:09:49+00:00" > 10/11/26, 10:09 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96629 <span data-processor="relativetime" data-value="2026-10-12T08:58:53+00:00" > 10/12/26, 08:58 </span>
-
Wolfgang Klinger commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-12T09:05:11+00:00" > 10/12/26, 09:05 </span>
Applied in changeset commit:bf675772615155b592f0f70827a6ed90e3050326.