Bug #31085
closedHandling file upload fields is broken
100%
Description
I get a fatal error if I hit the submit button.
( ! ) Fatal error: Call to a member function getValue() on a non-object in /home/phil/t3-playground/t3-git/typo3/sysext/form/Classes/Domain/Model/Attributes/Attributes.php on line 154
Call Stack
# Time Memory Function Location
1 0.0003 660504 {main}( ) ../index.php:0
2 0.0017 865048 require( '/home/phil/t3-playground/t3-git/typo3/sysext/cms/tslib/index_ts.php' ) ../index.php:84
3 0.1691 26427536 tslib_fe->INTincScript( ) ../index_ts.php:431
4 0.1691 26428032 tslib_fe->INTincScript_process( ) ../class.tslib_fe.php:3144
5 0.1702 26619968 tslib_cObj->COBJ_ARRAY( ) ../class.tslib_fe.php:3204
6 0.1702 26620048 tslib_content_ContentObjectArray->render( ) ../class.tslib_content.php:738
7 0.1702 26620128 tslib_cObj->cObjGet( ) ../class.tslib_content_contentobjectarray.php:48
8 0.1703 26620720 tslib_cObj->cObjGetSingle( ) ../class.tslib_content.php:548
9 0.1703 26621056 tx_form_Controller_Form->cObjGetSingleExt( ) ../class.tslib_content.php:594
10 0.1729 27107616 tx_form_Controller_Form->execute( ) ../Form.php:133
11 0.1759 27380304 tx_form_Controller_Form->doPostProcessing( ) ../Form.php:155
12 0.1955 29289064 tx_form_System_Postprocessor->process( ) ../Form.php:286
13 0.2449 31646784 tx_form_System_Postprocessor_Mail->process( ) ../Postprocessor.php:72
14 0.2643 32019952 tx_form_System_Postprocessor_Mail->setPlainContent( ) ../Mail.php:91
15 0.2661 32051792 tx_form_View_Mail_Plain->render( ) ../Mail.php:279
16 0.2661 32051792 tx_form_View_Mail_Plain_Element_Container->renderChildren( ) ../Plain.php:49
17 0.2735 32175824 tx_form_View_Mail_Plain_Element_Container->renderChild( ) ../Container.php:43
18 0.2736 32176712 tx_form_View_Mail_Plain_Element_Fieldset->render( ) ../Container.php:63
19 0.2736 32176848 tx_form_View_Mail_Plain_Element_Container->renderChildren( ) ../Fieldset.php:57
20 0.2742 32192480 tx_form_View_Mail_Plain_Element_Container->renderChild( ) ../Container.php:43
21 0.2748 32211456 tx_form_View_Mail_Plain_Element_Fileupload->render( ) ../Container.php:63
22 0.2749 32211496 tx_form_View_Mail_Plain_Element_Fileupload->getValue( ) ../Fileupload.php:48
23 0.2749 32211576 tx_form_Domain_Model_Element_Abstract->getAttributeValue( ) ../Fileupload.php:70
24 0.2749 32211576 tx_form_Domain_Model_Attributes_Attributes->getValue( ) ../Abstract.php:318
This is my form:
prefix = tx_form confirmation = 0 postProcessor { 1 = mail 1 { recipientEmail = phil@localhost.localdomain senderEmail = phil@localhost.localdomain } } 10 = HEADER 10 { class = content-header headingSize = h1 content = Form header } 20 = TEXTLINE 20 { name = easfsdf label { value = Another (changed) label } } 30 = TEXTLINE 30 { name = email label { value = Email } } 40 = CHECKBOXGROUP 40 { class = fieldset-subgroup legend { value = Edit this legend } name = test 10 = CHECKBOX 10 { label { value = Option 1 } } 20 = CHECKBOX 20 { label { value = Option 2 } } 30 = CHECKBOX 30 { label { value = Option 3 } } } 50 = FIELDSET 50 { class = predefined-name fieldset-subgroup fieldset-horizontal label-below legend { value = Full name } 10 = TEXTLINE 10 { label { value = Prefix } name = prefix size = 4 layout ( <input /> <label /> ) } 20 = TEXTLINE 20 { label { value = First name } name = firstName size = 10 layout ( <input /> <label /> ) } 30 = TEXTLINE 30 { label { value = Middle name } name = middleName size = 6 layout ( <input /> <label /> ) } 40 = TEXTLINE 40 { label { value = Last name } name = lastName size = 15 layout ( <input /> <label /> ) } 50 = TEXTLINE 50 { label { value = Suffix } name = suffix size = 4 layout ( <input /> <label /> ) } } 60 = RADIOGROUP 60 { class = fieldset-subgroup legend { value = Edit this legend } name = test 10 = RADIO 10 { label { value = Option 1 } } 20 = RADIO 20 { label { value = Option 2 } } 30 = RADIO 30 { label { value = Option 3 } } } 70 = TEXTAREA 70 { cols = 40 rows = 55 name = text area label { value = Edit this label } } 80 = PASSWORD 80 { name = 21 label { value = Edit this label } } 90 = FIELDSET 90 { legend { value = Edit this legend } 10 = HIDDEN 10 { name = 23 } 20 = FILEUPLOAD 20 { name = 24 label { value = Edit this label } } 30 = SELECT 30 { name = 25 label { value = Edit this label } 10 = OPTION 10 { data = Option 1 } 20 = OPTION 20 { data = Option 2 } 30 = OPTION 30 { data = Option 3 } } 40 = RESET 40 { value = Clear form } } 100 = SUBMIT 100 { name = 27 value = Submit form } rules { 1 = required 1 { breakOnError = 0 showMessage = 1 message = Required error = This field is required element = email } 2 = email 2 { breakOnError = 0 showMessage = 1 message = (john.doe@domain.com) error = This is not a valid email address element = email } 3 = required 3 { breakOnError = 0 showMessage = 1 message = * error = Required element = firstName } 4 = required 4 { breakOnError = 0 showMessage = 1 message = * error = Required element = lastName } 5 = length 5 { breakOnError = 0 showMessage = 1 message = The length of the value must have a minimum of %minimum characters error = The value is less than %minimum characters long minimum = 0 maximum = 0 element = text area } }
Updated by Oliver Hader about 13 years ago
- Status changed from New to Accepted
- Priority changed from Should have to Must have
- Target version set to 4.6.0
Updated by Oliver Hader about 13 years ago
I can reproduce that with your TypoScript example.
Updated by Oliver Hader about 13 years ago
- Subject changed from Fatal error: Call to member function getValue() of non-object in .../Model/Attributes/Attributes.php to Handling file upload fields is broken
Updated by Oliver Hader about 13 years ago
I've added a first draft to https://review.typo3.org/#change,6003
The handling of attaching the file to a mail is still missing.
Updated by Mr. Hudson about 13 years ago
- Status changed from Accepted to Under Review
Patch set 3 of change I9ad7aa2df1e037f1ac8d50031300af9a030a617c has been pushed to the review server.
It is available at http://review.typo3.org/6003
Updated by Mr. Hudson about 13 years ago
Patch set 4 of change I9ad7aa2df1e037f1ac8d50031300af9a030a617c has been pushed to the review server.
It is available at http://review.typo3.org/6003
Updated by Steffen Gebert about 13 years ago
- Target version changed from 4.6.0 to 4.6.1
Updated by Mr. Hudson about 13 years ago
Patch set 5 of change I9ad7aa2df1e037f1ac8d50031300af9a030a617c has been pushed to the review server.
It is available at http://review.typo3.org/6003
Updated by Mr. Hudson about 13 years ago
Patch set 6 of change I9ad7aa2df1e037f1ac8d50031300af9a030a617c has been pushed to the review server.
It is available at http://review.typo3.org/6003
Updated by Mr. Hudson about 13 years ago
Patch set 7 of change I9ad7aa2df1e037f1ac8d50031300af9a030a617c has been pushed to the review server.
It is available at http://review.typo3.org/6003
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change Ifef076e82e864411f20f9cefc0c18d1561508466 has been pushed to the review server.
It is available at http://review.typo3.org/6552
Updated by Oliver Hader about 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cae3e8e76823494c065048801812583fbc7627bc.
Updated by Xavier Perseguers almost 13 years ago
- Status changed from Resolved to Closed