Project

General

Profile

Actions

Bug #76147

closed

checkbox items which was created with itemsProcFunc ignored in datahandler

Added by Oleg Kozlov almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-05-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

Is it not possible save dynamically added (itemsProcFunc) checkbox items. It is rendered correct in backend form, but values not saved in database.
There is code for radio element (function checkValueForRadio) -
if ($tcaFieldConf['itemsProcFunc'] && empty($res['value'])) {
$processingService = GeneralUtility::makeInstance(ItemProcessingService::class);
$processedItems = $processingService->getProcessingItems($table, $pid, $field, $this->checkValue_currentRecord,
$tcaFieldConf, $tcaFieldConf['items']);

foreach ($processedItems as $set) {
if ((string)$set[1] === (string)$value) {
$res['value'] = $value;
break;
}
}
}

Seems like similar code for checkboxes should be.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #76509: FormEngine does not allow saving dynamic items and does not preselect dynamic items based on column valueClosed2016-06-07

Actions
Related to TYPO3 Core - Bug #76984: Unsupported declare 'strict_types'Closed2016-07-07

Actions
Related to TYPO3 Core - Bug #76989: Invalid declare strict_types in CMS 7ClosedMarkus Klein2016-07-07

Actions
Actions #1

Updated by Christian Kuhn almost 8 years ago

confirmed. there is a @todo in ext:styleguide about that, too:

tx_styleguide_elements_basic

        'checkbox_6' => [
            // @todo: Checking a checkbox that is added by itemsProcFunc is not persisted correctly.
            // @todo: HTML looks good, so this is probably an issue in DataHandler?
            'label' => 'checkbox_6 itemsProcFunc',
            'config' => [
                'type' => 'check',
                'items' => [
                    ['foo', ''],
                    ['bar', ''],
                ],
                'itemsProcFunc' => 'TYPO3\\CMS\\Styleguide\\UserFunctions\\FormEngine\\TypeCheckbox8ItemsProcFunc->itemsProcFunc',
            ],
        ],

Actions #2

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #3

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #4

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #5

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #6

Updated by Anja Leichsenring almost 8 years ago

  • Sprint Focus set to On Location Sprint
Actions #7

Updated by Gerrit Code Review almost 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #8

Updated by Gerrit Code Review almost 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #9

Updated by Gerrit Code Review almost 8 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48082

Actions #10

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48450

Actions #11

Updated by Anja Leichsenring almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Claus Due almost 8 years ago

Same problem exists for "select" type - opening another issue.

Actions #13

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF