[BUGFIX] Checkboxes with itemProcFunc are not saved 82/48082/8
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:54:38 +0000 (23:54 +0200)
commit8567387cd557456fccac7430a14e9ea2b41b3523
tree24ead018cb7b5228677d6978089a2d28f6975d06
parent46db413db45677f1ed803641c54c255fd556001d
[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/48082
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
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