Project

General

Profile

Actions

Bug #23552

closed

TCE_Forms Select & group fields remove item bug (have seen #0014599)

Added by Aske Ertmann over 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend User Interface
Target version:
Start date:
2010-09-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Hello,

I've been having this problem for a while now, and I finally checked the bug tracker for the issue. The issue is there (#0014599) but has been closed because of problems with reproducing it. Anyway I've got a bit more into the code and can very much reproduce the problem, also with the latest trunk version of class.t3lib_tceforms.php where the javascript is inlined.

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)


Files

patch_tceforms.diff (500 Bytes) patch_tceforms.diff Administrator Admin, 2010-09-17 12:18
Screen_Shot_2013-10-30_at_19.03.44.png (42.8 KB) Screen_Shot_2013-10-30_at_19.03.44.png Bjorn Kuipers, 2013-10-30 19:13
Screen_Shot_2013-10-30_at_19.03.56.png (39.7 KB) Screen_Shot_2013-10-30_at_19.03.56.png Bjorn Kuipers, 2013-10-30 19:13
Actions

Also available in: Atom PDF