Bug #69376
closedEXT:form - OPTGROUP cannot be a child element of SELECT
100%
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
Updated by Björn Jacob about 9 years ago
- Subject changed from Forms: OPTGROUP cannot be an child element of SELECT to Forms: OPTGROUP cannot be a child element of SELECt
Updated by Björn Jacob about 9 years ago
- Subject changed from Forms: OPTGROUP cannot be a child element of SELECt to Forms: OPTGROUP cannot be a child element of SELECT
Updated by Björn Jacob about 9 years ago
- Status changed from New to On Hold
On hold since we're working on the new fluid FE rendering, see #69401.
Updated by Björn Jacob about 9 years ago
- Subject changed from Forms: OPTGROUP cannot be a child element of SELECT to EXT:form - OPTGROUP cannot be a child element of SELECT
- Status changed from On Hold to Needs Feedback
- Assignee set to Ralf Zimmermann
This ist fixed in version 7.5. Is there any chance of fixing this for 6? At least try to avoid the PHP error.
Updated by Gerrit Code Review about 9 years ago
- Status changed from Needs Feedback 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/43477
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43477
Updated by Gerrit Code Review about 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/43492
Updated by Björn Jacob about 9 years ago
- Target version set to 6.2.16
- TYPO3 Version changed from 7 to 6.2
Updated by Gerrit Code Review about 9 years ago
Patch set 2 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/43492
Updated by Björn Jacob about 9 years ago
Test form:
prefix = tx_form confirmation = 1 postProcessor { 1 = mail 1 { recipientEmail = your@mail.com senderEmail = your@mail.com } } 10 = TEXTLINE 10 { name = birth label { value = Date of birth } } 20 = SELECT 20 { label = Select name = select1 10 = OPTGROUP 10 { label = Optgroup 10 = OPTION 10 { data = Option 1 value = value 1 } 20 = OPTION 20 { data = Option 2 value = value 2 } } } 30 = SUBMIT 30 { name = submit value = Submit } rules { 1 = date 1 { breakOnError = 0 showMessage = 1 message = (%format) error = No date! format = %e-%m-%Y element = birth } }
Updated by Ralf Zimmermann almost 9 years ago
This is another Bug(?).
Please give the Select Element a "name" propery. Now it works.
The same goes for the TEXTLINE element. Remove "name = birth" and the confirmation page will stay empty.
But this is a new issue and not related to the current issue.
Updated by Björn Jacob almost 9 years ago
You are right. I have changed the example form above. Now it works like a charm.
Updated by Ralf Zimmermann almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset be570a52a266d71d1911e58071dd43a0a65349a8.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed