Bug #65965
closedWrong $paramsList in FormEngine->getSingleField_typeInput
100%
Description
Found a bug in line 1537 in method getSingleField_typeInput in class FormEngine:
Is:
$paramsList = '\'' . $PA['itemFormElName'] . '\',\'' . implode(',', $evalList) . '\',\'' . trim($config['is_in']) . '\',' . (isset($config['checkbox']) ? 1 : 0) . ',\'' . $config['checkbox'] . '\'';
Must be:
$paramsList = '\'' . $PA['itemFormElName'] . '\',\'' . implode(',', $evalList) . '\',\'' . trim($config['is_in']) . '\',' . ($checkboxIsset ? 1 : 0) . ',\'' . $config['checkbox'] . '\'';
If $config['checkbox'] is not set it gets set in line 1449ff.
if (!isset($config['checkbox'])) { $config['checkbox'] = '0'; $checkboxIsset = FALSE; } else { $checkboxIsset = TRUE; }
So isset($config['checkbox'] is always true.
This causes the forth paramter of the JS method fieldGet to be always 1 and there is no possibility to allow the value 0 in an textfield that evaluates to an integer value.
Updated by Markus Klein over 9 years ago
Wow, great finding. Can you push a patch please to our review system?
All information can be found here http://wiki.typo3.org/CWT
Updated by Markus Klein over 9 years ago
This bug dates back to #23763 (4 years)
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/38103
Updated by Markus Klein over 9 years ago
- Assignee set to Markus Klein
- Target version set to next-patchlevel
- Complexity changed from easy to no-brainer
Please review the patch, test it and vote! Thanks.
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38317
Updated by Markus Klein over 9 years ago
Can be tested on 6.2. Simply edit a content element and look at the Top Margin field. It is empty and you can't enter 0.
With the patch applied 0 is displayed, because it is the default value.
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4a089571ac51f42855032fb65645501e97f6cc40.