Bug #66776
closedException Call to a member function getValue() on a non-object when tx_form is submitted with confirmation = 1
0%
Description
If confirmation is set to 1 in a tx_form submitting the form is failing on the confirmation-page with this exception:
PHP Fatal error: Call to a member function getValue() on a non-object in /srv/www/vhosts/typo3_src-6.2.12/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php on line 141
The configuration of the form is:
enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
1 = mail
1 {
recipientEmail = tobias.schaefer@ptb.de
senderEmail = tobias.schaefer@ptb.de
subject = test
}
}
10 = TEXTLINE
10 {
name = test
label {
value = Test
}
}
20 = SUBMIT
20 {
name = 3
value = Submit form
}
In the installtool the Configuration presets -> Development / Production settings needs to be set to Production to get the confirmation page.
Otherwise this Exception is thrown:
PHP Warning: Invalid argument supplied for foreach() in /srv/www/vhosts/typo3_src-6.2.12/typo3/sysext/form/Classes/Utility/ValidatorUtility.php line 115
(see https://forge.typo3.org/issues/58878)
Updated by Björn Jacob over 9 years ago
- Category changed from Form Framework to 1602
Updated by Björn Jacob over 9 years ago
- Category changed from 1602 to Form Framework
Updated by Björn Jacob over 9 years ago
- Status changed from New to Closed
Issue #60995 already tackles this problem. Possibilities are high that this will be backported for 6.2.
Updated by Ralf Zimmermann over 9 years ago
I cannot reproduce this with TYPO3 6.2.15-dev and 7.5.0-dev
The first bugPHP Fatal error: Call to a member function getValue() on a non-object in /srv/www/vhosts/typo3_src-6.2.12/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php on line 141
mostly appears in combination with wrong layout handling.
But that does not appear in the example...
I dont know what happened, your typoscript looks valid and worked for me without errors.
The second described bugPHP Warning: Invalid argument supplied for foreach() in /srv/www/vhosts/typo3_src-6.2.12/typo3/sysext/form/Classes/Utility/ValidatorUtility.php line 115
is resolved by
https://forge.typo3.org/issues/66508
https://forge.typo3.org/issues/64668