Actions
Bug #90214
closedTCA maxitems is ignored
Start date:
2020-01-27
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
Hi,
When setting TCA maxitems to 1 for INLINE relations, and update the record from FE form, maxitems is ignored, many relations are created in sys_file_reference where there should be only one.
New relation is inserted but old relation is not deleted.
Sample TCA :
'cv' => [ 'exclude' => false, 'label' => 'cv', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'cv', [ 'minitems' => 0, 'maxitems' => 1, 'foreign_match_fields' => [ 'fieldname' => 'cv', 'tablenames' => 'fe_users', 'table_local' => 'sys_file', ] ], 'pdf' ), ]
And update with :
$this->userRepository->update($user);
The bug appeared in Typo3 9.5.13 but wasn't present in previous V9 versions (don't know exactly which one).
Florian
Files
Actions