Project

General

Profile

Actions

Bug #65965

closed

Wrong $paramsList in FormEngine->getSingleField_typeInput

Added by Klaus Moser over 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend API
Target version:
Start date:
2015-03-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #23763: Enable "clear input field" functionality by defaultClosedJeff Segars2010-10-17

Actions
Related to TYPO3 Core - Bug #68303: Image width/height are displayed as 0 in backend for default dimensionsUnder Review

Actions
Actions #1

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

Actions #2

Updated by Markus Klein over 9 years ago

This bug dates back to #23763 (4 years)

Actions #3

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

Actions #4

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.

Actions #5

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

Actions #6

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.

Actions #7

Updated by Markus Klein over 9 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF