Project

General

Profile

Actions

Bug #69376

closed

EXT:form - OPTGROUP cannot be a child element of SELECT

Added by Björn Jacob over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Form Framework
Target version:
Start date:
2015-08-27
Due date:
% Done:

100%

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

Description

The following code produces an PHP fatal error:

10 = SELECT
10 {
    label = Select

    10 = OPTGROUP
    10 {
        label = Optgroup

        10 = OPTION
        10 {
            data = Option 1
            value = value 1
        }

        20 = OPTION
        20 {
            data = Option 2
            value = value 2
        }
    }
}

The code mentioned above should be possible, see documentation.

The following error occurs:

#1: PHP Catchable Fatal Error: Argument 1 passed to
TYPO3\CMS\Form\Domain\Model\Element\SelectElement::addElement()
must be an instance of TYPO3\CMS\Form\Domain\Model\Element\OptionElement,
instance of TYPO3\CMS\Form\Domain\Model\Element\OptgroupElement given, called in
/typo3/cms/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php on line 165
and defined in
/typo3/cms/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php line 56
Actions

Also available in: Atom PDF