Review main Ready for review Stale

95160[BUGFIX] Seed record type in new row when given from outside

Gordon Brüggemann CR 0 V 0 Hard +338 −0 updated 09/09/26, 05:43

Commit message

Adding a section container to a flex form field of a new, unsaved
record renders an empty container and emits "Undefined array key"
warnings, if the data structure of that field is defined per record
type via types.<type>.columnsOverrides.<field>.config.ds.

FormFlexAjaxController::containerAdd() hands the record type of the
unsaved record to the FormDataCompiler as "recordTypeValue", but the
type field itself stays empty in "databaseRow". TcaFlexPrepare
determines the data structure from that row, so it falls back to the
default data structure, which does not know the section.

DatabaseRowInitializeNew now reflects a record type value given from
outside in the database row, so that row and "recordTypeValue" agree
for new records. This covers PageWizardStepBuilder as well, which
hands the doktype over the same way. Type fields in the syntax
"localField:foreignField" point to a field of a foreign table and
therefore stay untouched.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/60/95160/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/60/95160/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 2

Issues 1

Files 3

Review log 24

  1. Gordon Brüggemann uploaded patch set 1 08/07/26, 01:10

  2. core-ci voted on patch set 1 V +1 08/07/26, 01:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106086

  3. Georg Ringer uploaded patch set 2 V +1 09/09/26, 05:36

  4. core-ci voted on patch set 2 V +1 09/09/26, 05:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108138