TCE_Forms Select & group fields remove item bug (have seen #0014599)
Here's the problem: Having selected multiple items in a group or select field. Then trying to remove a single item results in removing all the items.
The solution is very simple by changing fObjSel.size to fObjSel.length (which is already set as the var "l") in line 5637:
(type=="Remove" && fObjSel.size > 1) to (type=="Remove" && l > 1).
This validates the if if there's more than 1 elements in the selected options.
Can although also just be changed to fObjSel.length if preferred.
Related to #0014599
(issue imported from #M15731)
Updated by Einar Gislason over 7 years ago
I'm having this issue with TYPO3 6.1.3
I have a flexform inside a content element and when trying to remove a single item they all get removed.
<settings.tabs> <TCEforms> <label>Some random label...</label> <config> <type>group</type> <internal_type>db</internal_type> <allowed>tt_content</allowed> <maxitems>10</maxitems> <show_thumbs>1</show_thumbs> <wizards> <suggest> <type>suggest</type> </suggest> </wizards> </config> </TCEforms> </settings.tabs>
Updated by Bjorn Kuipers about 7 years ago
- File Screen_Shot_2013-10-30_at_19.03.44.png Screen_Shot_2013-10-30_at_19.03.44.png added
- File Screen_Shot_2013-10-30_at_19.03.56.png Screen_Shot_2013-10-30_at_19.03.56.png added
- Target version set to next-patchlevel
I have the same issue in TYPO3 6.1.5 for managing the items in a Record Collection.
When creating a Record Collection of type 'static record composition' and that holds a custom table records, removing a single item is not possible. The whole list is cleared when attempting to do so. See attached screenshots.
The strange thing is the same button, same TYPO3-site, .
The only difference I noticed was the option's value. For usergroups the value is numeric, while for the Record Collection items it will contain the tablename + uid. Maybe this has to do with it?
setFormValueManipulate('data[fe_users][usergroup]','Remove'); return false setFormValueManipulate('data[sys_collection][items]','Remove'); return false
Updated by Francois Suter almost 7 years ago
- Category set to Backend User Interface
- Assignee set to Francois Suter
- Complexity set to easy
- Is Regression set to No
See my comment on Gerrit for another take on the matter. The problem is related to missing size property. The better solution IMO is to set a default size when rendering such a field.