Review main Merged

60293[FEATURE] Introduce TCA type "language"

Benni Mack CR +2 V +2 Expert +1456 −871 updated 03/16/21, 21:39

Commit message

A new TCA type "language" is added, in order to make life easier
to set up new TCA. The main issue (as can be seen in core already)
is that each TCA adds different implementations on how to deal with
"-1". Now "-1" is added for any record except "pages", where the
"-1 / All Languages" concept is not implemented.

In addition, this decouples the select type from sys_language,
effectively reducing the logic where a direct access is necessary
to the "sys_language" table.

This effectively also removes the now mis-use of `foreign_table`
from the TCA "languageField" field by properly handling languages
internally. This furthermore makes any relation handling superfluous,
reducing quite an amount of code and complexity in the DataHandler.

Instead, all columns, defined as "[ctrl][languageField]", are now
automatically migrated to the new "type=language", with no specific
configuration, as TYPO3 is managing this field, taking care of the
user specific configuration.

Furthermore, are all columns, using the “special=languages” option,
migrated to the new TCA type. This allows to get rid of this special
case as well, reducing complexity in FormEngine and DataHandler.

The new TCA type also properly handles the field for records on
root level, or on a page outside of a site context. The only
exception is the `allowed_languages` field in be_users and
be_groups, where a new itemsProcFunc is used.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Benni Mack +1
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 1

Files 204

Show 184 more files

Review log 3781

Show 2256 earlier messages
  1. Benni Mack uploaded patch set 1 03/17/19, 14:03

  2. TYPO3com voted on patch set 1 V -1 03/17/19, 14:18 Completed build in 14m 58s on Sun, 17 Mar, 03:18 PM Test Summary: 18 of 47598 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32823

  3. Benni Mack updated the commit message in patch set 2 04/09/19, 13:25

  4. TYPO3com voted on patch set 2 V -1 04/09/19, 13:43 Completed build in 17m 08s on Tue, 9 Apr, 03:43 PM Test Summary: 18 of 47664 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33142

  5. Benni Mack uploaded patch set 3 09/27/19, 14:27

  6. TYPO3com voted on patch set 3 V -1 09/27/19, 14:37 Completed build in 10m 24s on Fri, 27 Sep, 02:37 PM Test Summary: 21 of 48079 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36902

  7. Benni Mack rebased onto patch set 4 12/27/19, 06:25

  8. TYPO3com voted on patch set 4 V -1 12/27/19, 06:33 Completed build in 07m 37s on Fri, 27 Dec, 06:33 AM Test Summary: 21 of 69584 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39578

  9. Benni Mack abandoned the change 02/27/20, 11:03

  10. Benni Mack restored the change 01/21/21, 07:01

  11. Benni Mack uploaded patch set 5 01/21/21, 07:03

  12. TYPO3com voted on patch set 5 V -1 01/21/21, 07:14 Completed build in 10m 46s on Thu, 21 Jan, 07:14 AM Test Summary: 587 of 32844 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8951

  13. Oli Bartsch rebased onto patch set 6 03/09/21, 21:49

  14. TYPO3com voted on patch set 6 V -1 03/09/21, 21:57 Completed build in 07m 08s on Tue, 9 Mar, 09:57 PM Test Summary: 590 of 32918 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9993

  15. core-ci voted on patch set 6 V -1 03/09/21, 22:06 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1348

  16. Georg Ringer rebased onto patch set 7 03/11/21, 07:28

  17. TYPO3com voted on patch set 7 V -1 03/11/21, 07:35 Completed build in 07m 01s on Thu, 11 Mar, 07:35 AM Test Summary: 590 of 32918 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10041

  18. core-ci voted on patch set 7 V -1 03/11/21, 07:45 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1405

  19. Oli Bartsch uploaded patch set 8 03/11/21, 23:59

  20. TYPO3com voted on patch set 8 V -1 03/12/21, 00:07 Completed build in 07m 32s on Fri, 12 Mar, 12:07 AM Test Summary: 590 of 32952 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10066

  21. core-ci voted on patch set 8 V -1 03/12/21, 00:18 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1438

  22. Oli Bartsch uploaded patch set 9 03/12/21, 10:48

  23. TYPO3com voted on patch set 9 V -1 03/12/21, 10:55 Completed build in 07m 09s on Fri, 12 Mar, 10:55 AM Test Summary: 402 of 32964 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10072

  24. core-ci voted on patch set 9 V -1 03/12/21, 11:07 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1450

  25. Oli Bartsch uploaded patch set 10 03/12/21, 11:28

  26. TYPO3com voted on patch set 10 V -1 03/12/21, 11:35 Completed build in 07m 05s on Fri, 12 Mar, 11:35 AM Test Summary: 261 of 32964 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10074

  27. core-ci voted on patch set 10 V -1 03/12/21, 11:44 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1452

  28. Oli Bartsch uploaded patch set 11 03/12/21, 11:51

  29. TYPO3com voted on patch set 11 V -1 03/12/21, 12:00 Completed build in 08m 51s on Fri, 12 Mar, 12:00 PM Test Summary: 18 of 32964 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10076

  30. core-ci voted on patch set 11 V -1 03/12/21, 12:06 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1454

  31. Oli Bartsch uploaded patch set 12 03/12/21, 13:35

  32. TYPO3com voted on patch set 12 V -1 03/12/21, 13:44 Completed build in 08m 27s on Fri, 12 Mar, 01:44 PM Test Summary: 9 of 32973 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10080

  33. core-ci voted on patch set 12 V -1 03/12/21, 13:49 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1458

  34. Oli Bartsch uploaded patch set 13 03/12/21, 16:09

  35. TYPO3com voted on patch set 13 V +1 03/12/21, 16:16 Completed build in 07m 06s on Fri, 12 Mar, 04:16 PM Test Summary: 32735 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10089

  36. core-ci voted on patch set 13 V +1 03/12/21, 16:22 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1466

  37. Oli Bartsch uploaded patch set 14 03/12/21, 23:06

  38. TYPO3com voted on patch set 14 V -1 03/12/21, 23:22 Completed build in 16m 22s on Fri, 12 Mar, 11:22 PM Test Summary: 4809 of 32959 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10100

  39. core-ci voted on patch set 14 V -1 03/12/21, 23:32 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1480

  40. Oli Bartsch uploaded patch set 15 03/12/21, 23:59

  41. TYPO3com voted on patch set 15 V -1 03/13/21, 00:16 Completed build in 16m 17s on Sat, 13 Mar, 12:16 AM Test Summary: 4804 of 32959 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10101

  42. core-ci voted on patch set 15 V -1 03/13/21, 00:27 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1481

  43. Oli Bartsch uploaded patch set 16 03/15/21, 10:36

  44. TYPO3com voted on patch set 16 V -1 03/15/21, 10:36 Completed build in 29s on Mon, 15 Mar, 10:36 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10137

  45. Oli Bartsch uploaded patch set 17 03/15/21, 10:37

  46. core-ci voted on patch set 16 V -1 03/15/21, 10:37 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1550

  47. TYPO3com voted on patch set 17 V -1 03/15/21, 10:53 Completed build in 16m 04s on Mon, 15 Mar, 10:53 AM Test Summary: 4801 of 32961 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10138

  48. core-ci voted on patch set 17 V -1 03/15/21, 11:02 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1551

  49. Oli Bartsch uploaded patch set 18 03/15/21, 11:33

  50. TYPO3com voted on patch set 18 V +1 03/15/21, 11:39 Completed build in 06m 04s on Mon, 15 Mar, 11:39 AM Test Summary: 32725 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10139

  51. core-ci voted on patch set 18 V +1 03/15/21, 11:43 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1552

  52. Oli Bartsch uploaded patch set 19 03/15/21, 16:57

  53. TYPO3com voted on patch set 19 V -1 03/15/21, 17:03 Completed build in 06m 28s on Mon, 15 Mar, 05:03 PM Test Summary: 2 of 32965 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10142

  54. core-ci voted on patch set 19 V -1 03/15/21, 17:07 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1558

  55. Oli Bartsch uploaded patch set 20 03/15/21, 21:23

  56. TYPO3com voted on patch set 20 V +1 03/15/21, 21:30 Completed build in 06m 54s on Mon, 15 Mar, 09:30 PM Test Summary: 32727 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10146

  1. core-ci voted on patch set 20 V +1 03/15/21, 21:35 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1563

  2. Oli Bartsch updated the commit message in patch set 21 03/15/21, 22:18

  3. TYPO3com voted on patch set 21 V +1 03/15/21, 22:25 Completed build in 06m 47s on Mon, 15 Mar, 10:25 PM Test Summary: 32727 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10147

  4. core-ci voted on patch set 21 V +1 03/15/21, 22:28 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1564

  5. Georg Ringer voted on patch set 21 V +1 CR +1 03/16/21, 07:22

  6. Christian Kuhn commented on patch set 21 CR -1 03/16/21, 10:53

    reviewing
  7. Christian Kuhn rebased onto patch set 22 03/16/21, 14:22

  8. Christian Kuhn voted on patch set 22 CR -1 03/16/21, 14:22

  9. TYPO3com voted on patch set 22 V -1 03/16/21, 14:29 Completed build in 07m 15s on Tue, 16 Mar, 02:29 PM Test Summary: 32124 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10166

  10. core-ci voted on patch set 22 V +1 03/16/21, 14:32 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1603

  11. TYPO3com voted on patch set 22 V +1 03/16/21, 14:52 Completed build in 37m 54s on Tue, 16 Mar, 02:52 PM Test Summary: 32907 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10166

  12. Christian Kuhn commented on patch set 22 03/16/21, 17:33

    SiteTcaInline.php:218

    sure this is needed? doesn't TcaLanguage continue if type!=='language' anyways?

    TcaInline.php:291

    sure this is needed? doesn't TcaLanguage continue if type!=='language' anyways?

    DataHandler.php:1819

    defined

    TcaSystemLanguageCollector.php:65

    should have a comment that this is used for be_users and be_groups 'allowed_languages' fields. other than that it's ok to have this method here since the entire class is @internal and shouldn't be misused by extensions anyway.

    DefaultConfiguration.php:548

    please add a 'depends' to the previous data provider, 'TcaColumnsRemoveUnused' - this basically enforces that the dependencyResolver can't juggle this around, which can be pretty hard to debug if that happens: the top-down order here in this file should also be the default order that is calculated, so it's clear for extensions to be sure they can hook in at a specific point.

    Feature-57082-NewTCATypeLanguage.rst:28

    different

    Feature-57082-NewTCATypeLanguage.rst:30

    maybe add a short paragraph that the new TCA type does not trigger sys_refindex entries for these 'relations' anymore: the cli command 'bin/typo3 referenceindex:update' should be executed to clean this up - it also makes that db table quite a bit smaller, which is a good thing, too.

    Feature-57082-NewTCATypeLanguage.rst:87

    this "Just as" sentence is misleading: be_users and be_groups are a different (internal) use case. Let's drop that sentence altogether.

    Feature-57082-NewTCATypeLanguage.rst:90

    That's not an upgrade wizard: Let's phrase it like this: "An automatic TCA migration is performed on the fly, adding deprecation messages ... bla"

    Feature-57082-NewTCATypeLanguage.rst:97

    until ... and maybe a bit too much information. maybe just drop the entire paragraph?

    locallang_general.xlf:178

    I always found the phrase 'Special languages' confusing. Do we have something better, where exactly is this used? If we don't have something better right now, we could keep it, though...

    importPagesAndRelatedTtContentWithImagesButNotIncluded.csv:23

    weird. what triggers this change? do you have any idea? did you dig deeper here? similar for other files below ...
  13. Oli Bartsch uploaded patch set 23 03/16/21, 20:18

  14. Oli Bartsch commented on patch set 23 03/16/21, 20:20

    SiteTcaInline.php:218 Reply

    Done

    TcaInline.php:291 Reply

    Done

    DataHandler.php:1819 Reply

    Done

    TcaSystemLanguageCollector.php:65 Reply

    Done

    DefaultConfiguration.php:548 Reply

    Done

    Feature-57082-NewTCATypeLanguage.rst:28 Reply

    Done

    Feature-57082-NewTCATypeLanguage.rst:30 Reply

    Done

    Feature-57082-NewTCATypeLanguage.rst:87 Reply

    Done

    Feature-57082-NewTCATypeLanguage.rst:90 Reply

    Done

    Feature-57082-NewTCATypeLanguage.rst:97 Reply

    Changed to "until". Would like to leave this here. I'm in general a fan of providing such information, so people are aware, their configuration is not "lost" and there is no "bug", but they just have to adapt the necessary places. Otherwise this is always kind of "trial and error".

    locallang_general.xlf:178 Reply

    This is used in the select element as optgroup label. All custom items (e.g. user defined via TSconfig) are added to this optgroup together with the "-1". I think the term does actually suits here really well, since these aren't "system defined (site) languages". I'm fully open for suggestions. Otherwise I would keep it as it is, for now.

    importPagesAndRelatedTtContentWithImagesButNotIncluded.csv:23 Reply

    As discussed via slack, this has to be a bug in the test, since `width` and `height` are defined as `l10n_mode=exclude` and can therefore never change in a translation. Im not quite sure why this did not fail previously. Similar test fixtures of EXT:impexp do use the correct values already, see e.g. importPagesAndRelatedTtContentWithDifferentImageToExistingData.csv
  15. TYPO3com voted on patch set 23 V +1 03/16/21, 20:27 Completed build in 08m 17s on Tue, 16 Mar, 08:27 PM Test Summary: 32907 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10172

  16. core-ci voted on patch set 23 V +1 03/16/21, 20:29 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1612

  17. Oli Bartsch updated the commit message in patch set 24 03/16/21, 20:39

  18. TYPO3com voted on patch set 24 V +1 03/16/21, 20:46 Completed build in 07m 26s on Tue, 16 Mar, 08:46 PM Test Summary: 32907 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10173

  19. core-ci voted on patch set 24 V +1 03/16/21, 20:49 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1613

  20. Georg Ringer voted on patch set 24 V +1 CR +1 03/16/21, 21:10

  21. Benni Mack voted on patch set 24 V +1 CR +1 03/16/21, 21:25

  22. Christian Kuhn voted on patch set 24 CR -1 03/16/21, 21:29

  23. Christian Kuhn commented on patch set 24 03/16/21, 21:36

    Feature-57082-NewTCATypeLanguage.rst:97 Reply

    ok.

    locallang_general.xlf:178 Reply

    ok.

    importPagesAndRelatedTtContentWithImagesButNotIncluded.csv:23 Reply

    yeah ... bit of a mystery, but 'more correct' now ... we'll see.
  24. Christian Kuhn voted on patch set 24 V +2 CR +2 03/16/21, 21:38

  25. Christian Kuhn merged patch set 25 03/16/21, 21:39