Project

General

Profile

Actions

Bug #103188

closed

TCA type category with manyToMany relation must allow maxitems=1

Added by Markus Klein 9 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Categorization API
Target version:
-
Start date:
2024-02-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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,
            ],
        ],
Actions #1

Updated by Markus Klein 9 months ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review 9 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83090

Actions #3

Updated by Gerrit Code Review 9 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83090

Actions #4

Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83112

Actions #5

Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83113

Actions #6

Updated by Markus Klein 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF