Project

General

Profile

Bug #103188

Updated by Markus Klein 3 months ago

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 

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

Back