[BUGFIX] Checkboxes with itemProcFunc are not saved 50/48450/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 11 May 2016 14:54:51 +0000 (16:54 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 4 Jun 2016 21:55:01 +0000 (23:55 +0200)
commita8adce7927c3723bfab8dcc21d53127ee9d6a6c0
tree92ba51b0a6b9faa9498cb95a91a88126a5d40615
parentfc8026fca7af7b10f6db741a5f4ecb105a025700
[BUGFIX] Checkboxes with itemProcFunc are not saved

Retrieve items added by an itemProcFunc before validating the current
set of selected checkboxes.

This fixes the bug that a item set consisting of mixed predefined and
dynamically added items always stored all predefined checkboxes as
selected (and no dynamic items).

It also fixes the case that a checkbox list consisting of purely
dynamically added items would never store a selection in the database,
showing all checkboxes as unselected.

Resolves: #76147
Releases: master, 7.6
Change-Id: I254a2936974f5bb5fbb6800a17667b66e1a86ca2
Reviewed-on: https://review.typo3.org/48450
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxes.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/Classes/Tca/CheckboxElementItems.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/ext_tables.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/ext_tables.sql
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php