Review main Merged

85095[FEATURE] Add default TCA columns from ctrl

Christian Kuhn CR +2 V +2 Nightmare +1441 −6238 updated 07/06/24, 18:03

Commit message

This patch adds a layer to the "load and create final TCA"
process. When "base" TCA files in 'Configuration/TCA' define
'ctrl' capabilities like 'languageField=sys_language_uid',
these fields need according 'columns' definitions.

The core now adds default definitions of such columns
if they do not exist after loading 'Configuration/TCA'
files, and before loading 'Configuration/TCA/Overrides'
files.

Developers no longer need to define such columns and
can rely on core adding them, if a capability is
enabled in 'ctrl'. There are two advantages: First,
it adds a level of control for these columns away
from extensions to the core, which is good for
future development in this area. Secondly, extension
developers no longer need to take care of nasty
configuration details of these columns and can
remove lots of boilerplace TCA definitions that had
to be maintained manually before. The patch shows
this: About 6000 lines of TCA definitions can be
removed.

These colummn are now handled automatically:

* ['ctrl']['enablecolumns']['disabled'] - typically set to
  "disabled" or "hidden"
* ['ctrl']['enablecolumns']['starttime'] - typically set
  to "starttime"
* ['ctrl']['enablecolumns']['endtime'] - typically set to
  "endtime"
* ['ctrl']['enablecolumns']['fe_group'] - typically set to
  "fe_group"
* ['ctrl']['editlock'] - used less often, typically set to
  "editlock"
* ['ctrl']['descriptionColumn'] - typically set to
  "description"
* ['ctrl']['languageField'] - typically set to
  "sys_language_uid"
* ['ctrl']['transOrigPointerField'] - typically set to
  "l10n_parent"
* ['ctrl']['transOrigDiffSourceField'] - typically set to
  "l10n_diffsource"
* ['ctrl']['translationSource'] - typically set to
  "l10n_source"

In the backend, this patch streamlines a couple of
details, by for instance using the same / default label
in all situations.

There are a couple of specific overrides to deviate from
defaults now defined by core. For example, new "pages"
should be disabled=1, but the default "disabled" columns
definition does not set disabled=1. "pages" thus overrides
the core default in a Configuration/TCA/Overrides file.

A couple of tests have a dependency to the order of columns
in TCA, and need minor as well. Some code in TcaPreparation
is now obsolete, together with a functional test.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 186

Show 166 more files

Review log 4673

Show 2948 earlier messages
  1. Christian Kuhn uploaded patch set 1 07/03/24, 14:59

  2. core-ci voted on patch set 1 V -1 07/03/24, 15:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60909

  3. Christian Kuhn uploaded patch set 2 V -1 07/03/24, 15:14

  4. core-ci voted on patch set 2 V +1 07/03/24, 15:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60910

  5. Christian Kuhn uploaded patch set 3 V +1 07/03/24, 15:42

  6. core-ci voted on patch set 3 V +1 07/03/24, 15:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60913

  7. Christian Kuhn commented on patch set 3 07/03/24, 15:56

    [enablecolumns][disabled] done
  8. Christian Kuhn uploaded patch set 4 V +1 07/03/24, 16:05

  9. core-ci voted on patch set 4 V -1 07/03/24, 16:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60915

  10. Christian Kuhn uploaded patch set 5 V -1 07/03/24, 16:15

  11. Christian Kuhn commented on patch set 4 07/03/24, 16:15

    [enablecolumns][disabled] now with tests, no other change.
  12. core-ci voted on patch set 5 V +1 07/03/24, 16:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60916

  13. Christian Kuhn uploaded patch set 6 V +1 07/03/24, 17:26

  14. Christian Kuhn uploaded patch set 7 07/03/24, 17:33

  15. core-ci voted on patch set 6 V -1 07/03/24, 17:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60919

  16. core-ci voted on patch set 7 V -1 07/03/24, 17:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60920

  17. Christian Kuhn uploaded patch set 8 V -1 07/03/24, 18:13

  18. core-ci voted on patch set 8 V -1 07/03/24, 18:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60922

  19. Christian Kuhn uploaded patch set 9 V -1 07/03/24, 18:21

  20. core-ci voted on patch set 9 V +1 07/03/24, 18:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60923

  21. Christian Kuhn commented on patch set 9 07/03/24, 18:28

    ['enablecolumns']['starttime'] done
  22. Christian Kuhn uploaded patch set 10 V +1 07/03/24, 18:44

  23. core-ci voted on patch set 10 V -1 07/03/24, 18:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60925

  24. Christian Kuhn uploaded patch set 11 V -1 07/03/24, 18:51

  25. core-ci voted on patch set 11 V -1 07/03/24, 18:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60926

  26. Stefan Bürk commented on patch set 11 07/04/24, 06:35

    TcaEnrichment.php:29

    Should also be enriched for `enabledcolumns.fe_group` field.
  27. Christian Kuhn uploaded patch set 12 V -1 07/04/24, 09:33

  28. Christian Kuhn commented on patch set 12 07/04/24, 09:38

    TcaEnrichment.php:29 Reply

    i know.
  29. core-ci voted on patch set 12 V +1 07/04/24, 09:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60954

  30. Christian Kuhn commented on patch set 12 07/04/24, 09:39

    ['enablecolumns']['endtime'] done
  31. Christian Kuhn uploaded patch set 13 V +1 07/04/24, 10:03

  32. core-ci voted on patch set 13 V +1 07/04/24, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60957

  33. Christian Kuhn commented on patch set 13 07/04/24, 10:21

    ['enablecolumns']['fe_group'] done
  34. Christian Kuhn uploaded patch set 14 V +1 07/04/24, 12:05

  35. core-ci voted on patch set 14 V +1 07/04/24, 12:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60966

  36. Christian Kuhn commented on patch set 14 07/04/24, 12:17

    'editlock' done
  37. Christian Kuhn uploaded patch set 15 V +1 07/04/24, 13:02

  38. core-ci voted on patch set 15 V +1 07/04/24, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60969

  39. Christian Kuhn commented on patch set 15 07/04/24, 13:13

    'descriptionColumn' done
  40. Christian Kuhn uploaded patch set 16 V +1 07/04/24, 14:36

  41. core-ci voted on patch set 16 V +1 07/04/24, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60973

  42. Christian Kuhn uploaded patch set 17 V +1 07/04/24, 19:03

  43. core-ci voted on patch set 17 V -1 07/04/24, 19:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60986

  44. Christian Kuhn commented on patch set 17 07/04/24, 19:14

    'transOrigPointerField' done
  45. Christian Kuhn uploaded patch set 18 V -1 07/04/24, 21:15

  46. core-ci voted on patch set 18 V -1 07/04/24, 21:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60990

  47. Christian Kuhn uploaded patch set 19 V -1 07/04/24, 22:05

  48. core-ci voted on patch set 19 V -1 07/04/24, 22:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60994

  1. Christian Kuhn commented on patch set 19 07/04/24, 22:21

    translationSource done. next: greenify, commit msg, .rst file.
  2. Christian Kuhn uploaded patch set 20 V -1 07/04/24, 22:41

  3. core-ci voted on patch set 20 V -1 07/04/24, 22:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60995

  4. Christian Kuhn uploaded patch set 21 V -1 07/04/24, 22:49

  5. Christian Kuhn uploaded patch set 22 07/04/24, 22:54

  6. core-ci voted on patch set 21 V +1 07/04/24, 22:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60996

  7. core-ci voted on patch set 22 V -1 07/04/24, 23:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60997

  8. Christian Kuhn uploaded patch set 23 V -1 07/04/24, 23:28

  9. Christian Kuhn uploaded patch set 24 07/04/24, 23:29

  10. core-ci voted on patch set 23 V -1 07/04/24, 23:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60998

  11. core-ci voted on patch set 24 V +1 07/04/24, 23:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60999

  12. Christian Kuhn uploaded patch set 25 V +1 07/05/24, 22:13

  13. Christian Kuhn rebased onto patch set 26 07/05/24, 22:14

  14. core-ci voted on patch set 25 V +1 07/05/24, 22:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61070

  15. core-ci voted on patch set 26 V +1 07/05/24, 22:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61071

  16. Oliver Klee commented on patch set 26 07/06/24, 07:34

    TcaEnrichment.php:28

    Is this class public API, or should we mark it as `@internal`?
  17. Georg Ringer voted on patch set 26 CR +1 V +1 07/06/24, 08:14

  18. Christian Kuhn uploaded patch set 27 CR +1 V +1 07/06/24, 08:18

  19. Christian Kuhn commented on patch set 26 07/06/24, 08:19

    TcaEnrichment.php:28 Reply

    good point. clearly internal. done. thx.
  20. core-ci voted on patch set 27 V +1 07/06/24, 08:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61086

  21. Georg Ringer voted on patch set 27 CR +1 V +1 07/06/24, 11:09

  22. Anja Leichsenring voted on patch set 27 CR +1 V +1 07/06/24, 13:25

  23. Stefan Bürk voted on patch set 27 CR +1 V +1 07/06/24, 17:32

  24. Christian Kuhn voted on patch set 27 CR +2 V +2 07/06/24, 18:02

  25. Christian Kuhn merged patch set 28 07/06/24, 18:03