#104646Default value for type passthrough does not work when in columnsOverrides
Description
As the title says, TCA type “passthrough” has not its default value set, when this value is defined in types/columnsOverrides.
The reason is the DataProvider for the default value is executed before the columnsOverrides provider, so at this point the default value is empty.
Normally this is overridden when fields are rendered in the form with their according default value.
But type passthrough is not rendered and so this does not apply.
Fixes could be either try to change the order of data providers (quick try resulted in Cyclic dependency issue) or render a hidden field with the default value (this could be restricted to NEW records).
Reviews 2
Related issues 3
History 7
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2024-08-16T19:40:45+00:00" > 08/16/24, 19:40 </span>
-
Benjamin Franzke changed Related to #103492 <span data-processor="relativetime" data-value="2024-10-07T14:33:08+00:00" > 10/07/24, 14:33 </span>
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T16:02:24+00:00" > 08/06/26, 16:02 </span>
-
Wolfgang Klinger changed Related to #101435 <span data-processor="relativetime" data-value="2026-10-11T06:12:26+00:00" > 10/11/26, 06:12 </span>
-
Wolfgang Klinger changed Related to #111013 <span data-processor="relativetime" data-value="2026-10-11T06:16:29+00:00" > 10/11/26, 06:16 </span>
-
Wolfgang Klinger commented <span data-processor="relativetime" data-value="2026-10-11T06:18:00+00:00" > 10/11/26, 06:18 </span>
-
Oliver Bartsch commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-31T09:18:28+00:00" > 10/31/26, 09:18 </span>Hey, I’m closing this as resolved. See Wolfgang’s comment.
Since #101435 (TYPO3 14) DataHandler reads the default values of a new record from the type-specific sub-schema, which includes columnsOverrides. So a columnsOverrides default for a passthrough field is stored now, as long as the field is part of the type’s showitem. I verified this with a functional test: a passthrough field in the showitem of CType “text” with a columnsOverrides default gets that value when the record is created.
If the passthrough field is not in the showitem, the columnsOverrides default is still ignored. That is by design of the Schema API: a type’s sub-schema only contains the fields of its showitem, so columnsOverrides outside the showitem never reach DataHandler. The field has to be in the showitem, which is fine for passthrough fields because they render nothing anyway.
While checking this I found that #101435 also dropped the plain TCA default of every column outside the type’s showitem. That is a separate problem, see #111013. The patch for it (https://review.typo3.org/c/Packages/TYPO3.CMS/+/96603) adds a test that pins the passthrough case from this issue.
For 13.4 this issue is still valid, #101435 was not backported. From my point of view this can be closed for 14 and main.