Issue Bug Closed

#103188TCA type category with manyToMany relation must allow maxitems=1

Markus Klein 02/23/24, 13:44 updated 07/09/24, 15:33

Description

Upgrading from older version the former makeCategorizable() method allowed to limit the category selection to a single item. (the MM relation was the only supported way)

The new TCA type “category” currently disallows maxItems=1 for anything except oneToOne.
This makes switching to the new TCA type impossible for upgrades, unless one migrates all data away.

There is no technical reason, why a manyToMany relation should not be restricted to 1, specifically as any other number is allowed.

TCA looks like this

        'categories' => [
            'exclude' => true,
            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.categories',
            'config' => [
                'type' => 'category',
                'size' => 10,
                'maxitems' => 1,
            ],
        ],

Reviews 3

History 37

  1. Markus Klein changed description 02/23/24, 13:45

  2. Gerrit Code Review pushed patch set 1 for main to change 83090 status New Under Review 02/23/24, 13:53

  3. Gerrit Code Review pushed patch set 2 for main to change 83090 02/23/24, 14:11

  4. Gerrit Code Review pushed patch set 1 for 11.5 to change 83112 02/23/24, 14:33

  5. Gerrit Code Review pushed patch set 1 for 12.4 to change 83113 02/23/24, 14:34

  6. Markus Klein commented and changed status Under Review Resolved done 0 % 100 % 02/28/24, 12:50

    Applied in changeset commit:f7a1b5e07dc8f8fbf3c8ae558340cf526cc056ec.

  7. Benni Mack changed status Resolved Closed 07/09/24, 15:33