Bug #3651
Call to a member function getBackend() on a non-object
Status: | Resolved | Start date: | 2009-06-12 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
When setting an object as value in View Helpers extending Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper, a fatal error is thrown.
<f:form.textbox value="{someObject}" />
->
Fatal error: Call to a member function getBackend() on a non-object in [TYPO3ROOT]\typo3conf\ext\fluid\Classes\ViewHelpers\Form\AbstractFormViewHelper.php on line 84
Reason:
Some left overs from the Fluid backport:
if (is_object($this->arguments['value']) && NULL !== $this->persistenceManager->getBackend()->getUUIDByObject($this->arguments['value'])) { $name .= '[__identity]'; }
This should rather be something like:
if (is_object($this->arguments['value']) && is_callable(array($this->arguments['value'], 'getUid'))) { $name .= '[uid]'; }
as in renderHiddenIdentityField() of the FormViewHelper.
Related issues
History
#1 Updated by Bastian Waidelich about 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r818.
#2 Updated by Bastian Waidelich almost 6 years ago
- Project changed from Extbase MVC Framework to TYPO3.Fluid
- Category deleted (
432)