Bug #45685
closedEXT:form Fatal error: Call to a member function getValue()
100%
Description
I get this Error with EXT:form
Fatal error: Call to a member function getValue() on a non-object in /typo3_src-6.0.2/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php on line 150
Typo3 6.0.2
Christian
Files
Updated by Stefan Weißwange over 10 years ago
- File bug_45685.diff bug_45685.diff added
- Target version set to next-patchlevel
Same bug happens with current version (6.1.7).
Attached is a diff, which does a simple check in the method where this error happens. We could not figure out which setting in the form element causes this error.
Updated by Jan Bartels over 10 years ago
Got the same issue on Typo3 6.2.4:
Fatal error: Call to a member function getValue() on a non-object in .../typo3_src-6.2.4/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php on line 141
Updated by Michael Oehlhof almost 10 years ago
Is this still an issue in 6.2.9 and 7.0?
Can you please add instructions how this error message can be reproduced.
Updated by Björn Jacob over 9 years ago
- Category set to 1602
- Status changed from New to Needs Feedback
- Is Regression set to No
Is this issue still occuring?
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
So far I've found one possibility to reproduce this.
Right now it is not possible to have the following setting.
1000 = SUBMIT 1000 { name = submit }
When not supplying the property value
one gets the above mentioned PHP error. Regarding to the SUBMIT element it should be possible not having a value.
We have to find even more use cases to come up with a proper solution.
@Christian: Would still be great if you could name us your use case.
Updated by Gerrit Code Review over 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/42774
Updated by Ralf Zimmermann over 9 years ago
There are 3 elements
RESET, SUBMIT and BUTTON
with code like this
TYPO3\CMS\Form\Domain\Model\Element\ButtonElement
public function setValue($value = '') { /** @var $localizationHandler \TYPO3\CMS\Form\Localization */ $localizationHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Localization'); $oldValue = $this->getAttributeValue('value'); ... }
TYPO3\CMS\Form\Domain\Model\Element\AbstractElement
public function getAttributeValue($key) { /** @var $this->attributes \TYPO3\CMS\Form\Domain\Model\Attribute\AttributesAttribute */ return $this->attributes->getValue($key); }
\TYPO3\CMS\Form\Domain\Model\Attribute\AttributesAttribute
public function getValue($key) { return $this->getAttributeObjectByKey($key)->getValue(); }
If "value" is not set by Typoscript there is no object for $this->getAttributeObjectByKey('value')
My patchset ist tested with TYPO3 6.2.15-dev and 7.5.0-dev
Updated by Björn Jacob about 9 years ago
- Assignee deleted (
Christian Tauscher) - Target version deleted (
next-patchlevel) - TYPO3 Version changed from 6.1 to 7
The issue can be tested by using the following setup:
enctype = multipart/form-data method = post prefix = tx_form confirmation = 1 postProcessor { 1 = mail 1 { recipientEmail = senderEmail = } } 10 = SUBMIT 10 { name = 2 } 20 = RESET 20 { name = 3 } 30 = BUTTON 30 { name = 4 }
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/42916
Updated by Ralf Zimmermann about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ae96b3545df21fc558bbd5429b4f2f9178649b24.