Bug #93342
closedForm Framework: duplicated form field identifier
0%
Description
Description
Form fields are getting same identifier, if form definition is to big (over 50 form fields).
This only happens if the position of the form fields is changed and afterwards new form fields are getting added to the form definition.
This is resulting in duplicated identifiers and the following Error Message:
TYPO3\CMS\Form\Domain\Model\Exception\DuplicateFormElementException
A form element with identifier "text-51" is already part of the form.
The generated yaml file looks like this:
text-51:
type: Text
identifier: text-51
label: Text
renderingOptions:
listView: 0
deleted: 0
...
-
defaultValue: ''
type: Text
identifier: text-51
label: Text
-
defaultValue: ''
type: Text
identifier: text-43
label: Text
-
defaultValue: ''
type: Text
identifier: text-44
label: Text
-
defaultValue: ''
type: Text
identifier: text-50
label: Text
-
defaultValue: ''
type: Text
identifier: text-45
label: Text
-
defaultValue: ''
type: Text
identifier: text-46
label: Text
-
defaultValue: ''
type: Text
identifier: text-47
label: Text
-
defaultValue: ''
type: Text
identifier: text-51
label: Text
If you add the form fields in order without changing their positions afterwards, all identifiers are unique.
The bug exists in all TYPO3 v10 versions up to TYPO3 10.4.12
Steps to reproduce
1. Install TYPO3 10.4.12
2. Create new Form
3. Create 50+ form fields, like text fields
4. Change position of several form fields
5. Add new form fields
Actual
Some form fields are getting the same identifier. Therefore you have to manually change the identifiers inside of the yaml file to get the form working.
Expected
All form fields getting unique identifiers.