Review main Merged

88898[BUGFIX] Use "allowed" option for TCA type=group in Extbase

Benni Mack CR +2 V +2 Easy +15 −5 updated 04/07/25, 19:52

Commit message

Extbase needed to have a "foreign_table" property in
TCA type=group records, in order to deal with
relations. This has been an issue since many versions,
and is now fixed by using the first entry of "allowed",
which is the documented setting for type=group.

This means, that Extbase developers do not need
to set "foreign_table" on TCA type=group anymore!

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Christian Kuhn +1
    • Stefan Froemken +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 2

Review log 1620

  1. Benni Mack uploaded patch set 1 04/02/25, 07:12

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

  3. Benjamin Franzke commented on patch set 1 CR -1 04/02/25, 07:24

    We should adapt typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_post.php accordingly and thus cover this by tests. Do you by chance know why typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_tag.php (`tx_blogexample_domain_model_tag.items`) worked without `freign_table` setting? (I guess because of MM usage?) Will look into it.
  4. Garvin Hicking voted on patch set 1 CR +1 04/02/25, 07:28

  5. Garvin Hicking voted on patch set 1 CR 0 04/02/25, 07:28

  6. Stefan Froemken commented on patch set 1 CR -1 04/02/25, 07:47

    ColumnMapFactory.php:75

    This is a little bit miss-leading. If multiple tables are configured in "allowed" or "prepend_tname" is activated you can of cause deal with multiple table relations. Maybe your comment is related to extbase ond the "foreign_table" option. Can you update the comment accordingly? Example: // TCA type="group" allows multiple tables via the "allowed" property. // However, Extbase DataMapper does not support resolving multi-table relations // stored in a single column (e.g., "pages_135,tt_content_7283"). // Therefore, only the first entry of "allowed" is used for Extbase compatibility.
  7. Benni Mack commented on patch set 1 04/02/25, 09:17

    ColumnMapFactory.php:75 Reply

    Stefan, feel free to adapt, you're more Extbase guru than me :)
  8. Benjamin Franzke uploaded patch set 2 CR -1 V -1 04/02/25, 09:38

  9. core-ci voted on patch set 2 V -1 04/02/25, 09:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76854

  10. Benni Mack commented on patch set 2 04/02/25, 10:04

    tx_blogexample_domain_model_post.php:79

    semantically, this is wrong. select needs foreign_table, "allowed" should be group
  11. Benni Mack commented on patch set 3 V -1 04/02/25, 10:04

    Published edit on patch set 2.
  12. core-ci voted on patch set 3 V -1 04/02/25, 10:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76857

  13. Benjamin Franzke commented on patch set 3 04/02/25, 10:27

    tx_blogexample_domain_model_post.php:79 Reply

    uff, sorry, i thought this was `group` as well 🤦
  14. Benjamin Franzke uploaded patch set 4 V -1 04/02/25, 10:36

  15. Benjamin Franzke commented on patch set 4 04/02/25, 10:36

    ColumnMapFactory.php:75 Reply

    yes, so the basic issue is that extbase would need support for union types, right? Tried to adapt the comment.

    tx_blogexample_domain_model_post.php:79 Reply

    Done
  16. core-ci voted on patch set 4 V +1 04/02/25, 10:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76863

  17. Christian Kuhn voted on patch set 4 CR +1 V +1 04/07/25, 10:58

  18. Stefan Froemken voted on patch set 4 CR +1 04/07/25, 19:50

  19. Georg Ringer voted on patch set 4 CR +2 V +2 04/07/25, 19:52

  20. Georg Ringer merged patch set 5 04/07/25, 19:52