Review main Merged Breaking

73488[!!!][FEATURE] Auto-registration of NewContentElementWizard via TCA

Benni Mack CR +2 V +2 Expert +955 −702 updated 01/23/24, 08:57

Commit message

This change automatically registers all TCA types
to the new content element wizard, so no pageTS
is needed anymore.

The old pageTS config is still evaluated and
overrides existing TCA config. This way it is
still possible to add additional wizard items
with special default values.

Due to the switch, some groups are renamed and
the structuring has slightly changed as it is
now aligned with the CType switch select box.
Most importantly the group `common` is now
named `default`. A permanent migration is in
place.

Items can still be removed through TCEFORM. This
will remove both, the entry in the CType select
and the wizard item. This is the old behavior.

Since all groups and elements, defined in TCA
are added automatically, the previously `show`
list is no longer evaluated. To remove groups
and elements only in the wizard, a new option
"removeItems" is available.

In addition, labels of TCA for tt_content
have been consolidated into EXT:frontend/Resources/Private/locallang_ttc.xlf

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 20

Review log 4061

Show 2236 earlier messages
  1. Benni Mack uploaded patch set 1 02/14/22, 19:43

  2. core-ci voted on patch set 1 V -1 02/14/22, 19:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23555

  3. Simon Schaufelberger uploaded patch set 2 08/03/22, 23:28

  4. core-ci voted on patch set 2 V -1 08/03/22, 23:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29812

  5. Benni Mack marked it work in progress 03/24/23, 11:45

  6. Nikita Hovratov uploaded patch set 3 V -1 07/20/23, 16:31

  7. core-ci voted on patch set 3 V -1 07/20/23, 16:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44358

  8. Nikita Hovratov uploaded patch set 4 V -1 07/21/23, 08:31

  9. core-ci voted on patch set 4 V -1 07/21/23, 08:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44368

  10. Nikita Hovratov uploaded patch set 5 V -1 11/23/23, 22:53

  11. Nikita Hovratov marked it ready for review 11/23/23, 22:53

  12. core-ci voted on patch set 5 V -1 11/23/23, 23:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49826

  13. Nikita Hovratov uploaded patch set 6 V -1 11/24/23, 00:27

  14. core-ci voted on patch set 6 V -1 11/24/23, 00:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49827

  15. Nikita Hovratov uploaded patch set 7 V -1 11/24/23, 01:15

  16. core-ci voted on patch set 7 V -1 11/24/23, 01:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49829

  17. Benni Mack uploaded patch set 8 V -1 01/12/24, 11:24

  18. Benni Mack uploaded patch set 9 01/12/24, 11:26

  19. core-ci voted on patch set 8 V -1 01/12/24, 11:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51495

  20. core-ci voted on patch set 9 V -1 01/12/24, 11:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51496

  21. Nikita Hovratov uploaded patch set 10 V -1 01/14/24, 17:06

  22. core-ci voted on patch set 10 V -1 01/14/24, 17:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51555

  23. Nikita Hovratov uploaded patch set 11 V -1 01/14/24, 17:32

  24. core-ci voted on patch set 11 V -1 01/14/24, 17:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51556

  25. Nikita Hovratov uploaded patch set 12 V -1 01/14/24, 19:01

  26. core-ci voted on patch set 12 V +1 01/14/24, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51557

  27. Nikita Hovratov uploaded patch set 13 V +1 01/14/24, 19:25

  28. core-ci voted on patch set 13 V +1 01/14/24, 19:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51559

  29. Chris Müller commented on patch set 13 01/14/24, 20:30

    I think we need a Breaking rst as the "show" option is not evaluated anymore.
  30. Oli Bartsch commented on patch set 13 V -1 01/15/24, 17:44

    NewContentElementController.php:253

    This currently triggers a array to string conversion in case a plugin subtype with a new group, not present in an itemsGroup is added. However the reason seems to be unrelated to this patch but was introduced with #102826. Seems to be a bug in this block https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L850

    NewContentElementController.php:289

    This needs a fallback since `$selectItem->getGroup()` might not be defined in `itemGroups`. To be in line with the select field, this should "just" use the identifier.

    NewContentElementController.php:307

    The corresponding `type` is missing here.

    NewContentElementController.php:320

    Let's please have a test for this, similar to TcaMigration. Currently this leads to all wizards from PageTs are being added to the final wizard array because ohne 'common.' is unset. This should however only return the items, merged from `common.` to `default.`. Therefore, this should be something like: ``` if (!array_key_exists('common.', $wizardsFromPageTs)) { return []; } return [ 'default.' => array_merge($wizardsFromPageTs['default.'] ?? [], $wizardsFromPageTs['common.']) ]; ```

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:84

    Could we please adjust this example to also take `tt_content_defValues` into account, especially because this must be configured using the dot notating (which we might want to improve?).

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:110

    This does not work as `mod.wizards.newContentElement.wizardItems` is no longer evaluated, except the migration from common to default.
  31. Oli Bartsch commented on patch set 13 01/15/24, 23:32

    NewContentElementController.php:253 Reply

  32. Nikita Hovratov commented on patch set 13 01/16/24, 12:11

    NewContentElementController.php:253 Reply

    Done
  33. Oli Bartsch commented on patch set 13 01/16/24, 12:40

    on it
  34. Oli Bartsch uploaded patch set 14 V +1 01/17/24, 12:42

  35. core-ci voted on patch set 14 V -1 01/17/24, 12:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51682

  36. Oli Bartsch uploaded patch set 15 V -1 01/17/24, 12:50

  1. core-ci voted on patch set 15 V +1 01/17/24, 12:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51683

  2. Oli Bartsch commented on patch set 15 01/17/24, 13:59

    Reply

    Done

    NewContentElementController.php:289 Reply

    Done

    NewContentElementController.php:307 Reply

    Done

    NewContentElementController.php:320 Reply

    Done

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:84 Reply

    Done

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:110 Reply

    Done
  3. Benni Mack commented on patch set 15 CR -2 01/17/24, 15:03

    let me check something
  4. Andreas Kienast commented on patch set 15 01/22/24, 14:57

    Reply

    Did you have time to check something? ;)
  5. Benni Mack uploaded patch set 16 V +1 01/22/24, 20:57

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  6. core-ci voted on patch set 16 V +1 01/22/24, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51947

  7. Benni Mack uploaded patch set 17 V +1 01/22/24, 21:13

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  8. Benni Mack voted on patch set 17 CR 0 01/22/24, 21:13

  9. Benni Mack uploaded patch set 18 01/22/24, 21:15

  10. Benni Mack commented on patch set 18 01/22/24, 21:16

    Ready from my side. I am happy now
  11. core-ci voted on patch set 17 V -1 01/22/24, 21:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51948

  12. core-ci voted on patch set 18 V -1 01/22/24, 21:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51949

  13. Benni Mack uploaded patch set 19 V -1 01/22/24, 21:43

  14. core-ci voted on patch set 19 V -1 01/22/24, 21:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51954

  15. Benni Mack uploaded patch set 20 V -1 01/22/24, 21:53

  16. core-ci voted on patch set 20 V +1 01/22/24, 22:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51955

  17. Benni Mack voted on patch set 20 CR +1 V +1 01/22/24, 22:37

  18. Andreas Kienast commented on patch set 20 01/23/24, 07:08

    NewContentElementController.php:265

    Should we add a safe-guard in case a "smart" developer tinkers with tt_content TCA and removes `type` and/or `subtype_value_field`?

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:21

    as follows
  19. Oli Bartsch commented on patch set 20 CR -1 01/23/24, 07:26

    will review again
  20. Oli Bartsch uploaded patch set 21 CR +1 V +1 01/23/24, 08:34

  21. Oli Bartsch commented on patch set 21 CR +1 V +1 01/23/24, 08:34

    NewContentElementController.php:265 Reply

    Done

    Feature-102834-Auto-registrationOfNewContentElementWizardViaTCA.rst:21 Reply

    Done
  22. Andreas Kienast voted on patch set 21 CR +1 V +1 01/23/24, 08:39

  23. core-ci voted on patch set 21 V +1 01/23/24, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51969

  24. Benni Mack commented on patch set 21 CR +2 V +2 01/23/24, 08:57

    NewContentElementController.php:274

    IMHO this is not increasing readability.
  25. Benni Mack merged patch set 22 01/23/24, 08:57