Bug #3651

Call to a member function getBackend() on a non-object

Added by Bastian Waidelich over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-06-12
Due date:
% Done:

100%

Estimated time:
Has patch:

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

Related to TYPO3.Fluid - Feature #3317: AbstractFormViewHelper must be adjusted to be able to namespace argumentsResolvedSebastian Kurfuerst2009-05-15

Actions
#1

Updated by Bastian Waidelich over 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r818.

#2

Updated by Bastian Waidelich about 12 years ago

  • Project changed from 534 to TYPO3.Fluid
  • Category deleted (432)

Also available in: Atom PDF