Review main Abandoned

93006[WIP][TASK] Strip default-value fields from impexp export records

Benjamin Kott CR 0 V 0 Nightmare +398 −2676 updated 04/23/26, 06:18

Commit message

The export previously included every TCA-declared field even when its
value matched the configured (or implicit database) default, producing
verbose XML fixtures full of redundant data and making round-trip
comparisons fragile.

`filterRecordFields()` in Export is reworked to omit a field when its
value equals the TCA `default` (string-cast comparison to handle
integer/string mismatches from the database layer). For fields without an
explicit TCA default, zero-like values (null, "", 0, "0") are treated as
the implicit database default and stripped as well.

A small set of fields is kept unconditionally regardless of their value:
uid, pid, the type-discriminator, language-identity pointers
(sys_language_uid / l10n_parent / l10n_source), and the disabled field
(e.g. `hidden`). The disabled field is special-cased because tables like
`pages` declare `hidden` with a default of 1, which would otherwise cause
active records to drop the field and break preview icon rendering. DataHandler-
managed timestamps (tstamp, crdate) are stripped unconditionally as before.

FAL tables (sys_file, sys_file_storage, sys_file_metadata,
sys_file_reference) are exempt from default exclusion because the importer
resolves those records directly from the row rather than via DataHandler,
so all fields must survive the round-trip.

All export XML fixtures and import XML fixtures are regenerated to
reflect the reduced field set.

Review

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

Files 36

Show 16 more files

Review log 47

  1. Benjamin Kott uploaded patch set 1 02/26/26, 11:00

  2. core-ci voted on patch set 1 V -1 02/26/26, 11:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96900

  3. Benjamin Kott uploaded patch set 2 V -1 04/22/26, 15:03

  4. Benjamin Kott uploaded patch set 3 04/22/26, 15:06

  5. core-ci voted on patch set 2 V +1 04/22/26, 16:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100912

  6. core-ci voted on patch set 3 V +1 04/22/26, 16:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100913

  7. Benjamin Kott abandoned the change 04/23/26, 06:18