Project

General

Profile

Actions

Bug #79394

closed

Viewhelper "f:form.select" produces extra (empty) option tag

Added by Marcus Schwemer over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2017-01-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the viewhelper "f:form.select" is used together with the new viewhelper "f:form.select.option" ist produces an additional empty option tag which should not be there.

Reason:

Lines 128ff. in "typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php" create an empty array element, if the option attribute is not set in the viewhelper. This leads to the creation of the additional tag in the function "renderOptionTags()" (line 185ff.)

Solution:

  • split the function "renderOptionTags" into two parts
    • renderOptionTags
    • renderPrependOptionTag
  • create new function "renderEmptyOption" tag
  • check whether childContent is empty ... if yes, create an empty option tag, otherwise use childContent for the as option tags

I will come up with a patch.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #79274: Viewhelper form.select adds empty option if no optionsClosed2017-01-11

Actions
Actions #1

Updated by Marcus Schwemer over 7 years ago

  • Subject changed from Viewhelper "f:form.select" produces extra option tag to Viewhelper "f:form.select" produces extra (empty) option tag
Actions #2

Updated by Wouter Wolters over 7 years ago

  • Status changed from New to Rejected

This is a duplicate of #79274

Actions

Also available in: Atom PDF