Issue Bug Closed

#99035Automatic mm-table generation fails on multiple allowed tables

Alexander Grein 11/09/22, 20:13 updated 03/24/25, 21:33

Description

This TCA configuration generates the following sql table, where the necessary field “tablenames” is missing:

'fieldname' => [
    'label' => 'Label',
    'config' => [
        'type' => 'group',
        'internal_type' => 'db',
        'allowed' => 'tt_address,fe_users,fe_groups',
        'MM' => 'tx_my_group_mm',
        'size' => '20',
    ],
],
CREATE TABLE `tx_my_group_mm` (
  `uid_local` int(10) unsigned NOT NULL DEFAULT 0,
  `uid_foreign` int(10) unsigned NOT NULL DEFAULT 0,
  `sorting` int(10) unsigned NOT NULL DEFAULT 0,
  `sorting_foreign` int(10) unsigned NOT NULL DEFAULT 0,
  KEY `uid_local` (`uid_local`),
  KEY `uid_foreign` (`uid_foreign`)
);

Since TYPO3 11.4 the MM table should be generated as needed automatically, which obviously is not working in this case:
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/CommonProperties/Mm.html#auto-creation-of-intermediate-mm-tables-from-tca

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.