Bug #6570
RuntimeException thrown in file ViewHelperVariableContainer.php
Status: | Closed | Start date: | 2010-02-23 | |
---|---|---|---|---|
Priority: | -- undefined -- | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
No value found for key "F3\Fluid\ViewHelpers\FormViewHelper->formObject" 44 F3\Fluid\Core\ViewHelper\ViewHelperVariableContainer::get("F3\Fluid\ViewHelpers\FormViewHelper", "formObject") 43 F3\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::getPropertyValue() 42 F3\Fluid\ViewHelpers\Form\CheckboxViewHelper::render(NULL) 41 call_user_func_array(array, array) 40 F3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::evaluate() 39 F3\Fluid\Core\Parser\SyntaxTree\AbstractNode::evaluateChildNodes() 38 F3\Fluid\Core\ViewHelper\AbstractViewHelper::renderChildren() 37 F3\Fluid\ViewHelpers\FormViewHelper::render("createAddressType", array, NULL, NULL, NULL, NULL, "", NULL, NULL) 36 call_user_func_array(array, array) 35 F3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::evaluate() 34 F3\Fluid\Core\Parser\SyntaxTree\AbstractNode::evaluateChildNodes() 33 F3\Fluid\Core\ViewHelper\AbstractViewHelper::renderChildren() 32 F3\Fluid\ViewHelpers\SectionViewHelper::render() 31 call_user_func_array(array, array) 30 F3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::evaluate() 29 F3\Fluid\View\TemplateView::renderSection("mainbox") 28 F3\Fluid\ViewHelpers\RenderViewHelper::render("mainbox", "", array) 27 call_user_func_array(array, array) 26 F3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::evaluate() 25 F3\Fluid\Core\Parser\SyntaxTree\AbstractNode::evaluateChildNodes() 24 F3\Fluid\Core\Parser\SyntaxTree\RootNode::evaluate() 23 F3\Fluid\Core\Parser\ParsingState::render(F3\Fluid\Core\Rendering\RenderingContext) 22 F3\Fluid\View\TemplateView::renderWithLayout("master") 21 F3\Fluid\View\TemplateView::render() 20 F3\FLOW3\MVC\Controller\ActionController::callActionMethod() 19 F3\FLOW3\MVC\Controller\ActionController::processRequest(F3\FLOW3\MVC\Web\Request, F3\FLOW3\MVC\Web\Response) 18 F3\FLOW3\MVC\Dispatcher::dispatch(F3\FLOW3\MVC\Web\Request, F3\FLOW3\MVC\Web\Response) 17 F3\FLOW3\MVC\Dispatcher_AOPProxy_Development::dispatch(F3\FLOW3\MVC\Web\Request, F3\FLOW3\MVC\Web\Response) 16 call_user_func_array(array, array) 15 F3\FLOW3\MVC\Dispatcher_AOPProxy_Development::FLOW3_AOP_Proxy_invokeJoinPoint(F3\FLOW3\AOP\JoinPoint) 14 F3\FLOW3\AOP\Advice\AdviceChain::proceed(F3\FLOW3\AOP\JoinPoint) 13 F3\FLOW3\Security\Aspect\RequestDispatchingAspect::checkRequestHash(F3\FLOW3\AOP\JoinPoint) 12 F3\FLOW3\AOP\Advice\AroundAdvice::invoke(F3\FLOW3\AOP\JoinPoint) 11 F3\FLOW3\AOP\Advice\AdviceChain::proceed(F3\FLOW3\AOP\JoinPoint) 10 F3\FLOW3\Security\Aspect\RequestDispatchingAspect::blockIllegalRequests(F3\FLOW3\AOP\JoinPoint) 9 F3\FLOW3\AOP\Advice\AroundAdvice::invoke(F3\FLOW3\AOP\JoinPoint) 8 F3\FLOW3\AOP\Advice\AdviceChain::proceed(F3\FLOW3\AOP\JoinPoint) 7 F3\FLOW3\Security\Aspect\RequestDispatchingAspect::initializeSecurity(F3\FLOW3\AOP\JoinPoint) 6 F3\FLOW3\AOP\Advice\AroundAdvice::invoke(F3\FLOW3\AOP\JoinPoint) 5 F3\FLOW3\AOP\Advice\AdviceChain::proceed(F3\FLOW3\AOP\JoinPoint) 4 F3\FLOW3\MVC\Dispatcher_AOPProxy_Development::dispatch(F3\FLOW3\MVC\Web\Request, F3\FLOW3\MVC\Web\Response) 3 F3\FLOW3\MVC\Web\RequestHandler::handleRequest() 2 F3\FLOW3\Core\Bootstrap::run() 1 require("/Library/WebServer/htdocs/FLOW3-1.0.0-alpha7/Packages/Framework/FLOW3/Scripts/FLOW3.php")
Hi!
I have nearly the same problem like http://forge.typo3.org/issues/show/4277 and http://forge.typo3.org/issues/show/6004
Error at rendering of forms only at checkboxes:
The upper Exception thrown if the new-action in the controller is like this:
/** * Index action * * @param \F3\AddressBook\Domain\Model\AddressType $newAddressType * @return string * @dontvalidate $newAddressType */ public function newAddressTypeAction(\F3\AddressBook\Domain\Model\AddressType $newAddressType = NULL) { $this->view->assign('newAddressType', $newAddressType); }
Workaround for this (like http://forge.typo3.org/issues/show/6004):
/** * Index action * * @param \F3\AddressBook\Domain\Model\AddressType $newAddressType * @return string * @dontvalidate $newAddressType */ public function newAddressTypeAction(\F3\AddressBook\Domain\Model\AddressType $newAddressType = NULL) { if ($newAddressType === NULL) { $newAddressType = $this->objectFactory->create('F3\AddressBook\Domain\Model\AddressType'); } $this->view->assign('newAddressType', $newAddressType); }
If this is done, an form error will shown: "Checkbox viewhelpers can only be bound to properties of type boolean or array. Property "default" is of type "NULL"."
The expecting model definitions are:
/** * @var boolean */ protected $default; /** * Sets default * * @param integer * @return void */ public function setDefault($default) { $this->default = $default; } /** * Returns default * * @return integer */ public function getDefault() { return $this->default; }
workaround
/** * Sets default * * @param integer * @return void */ public function setDefault($default) { $this->default = (boolean) $default; } /** * Returns default * * @return integer */ public function getDefault() { return (boolean) $this->default; }
In this case, I'm not sure if this should be this way.
And at least if all is done, the checkbox is checked by default, even than when $this->default is set to false.
History
#1 Updated by Karsten Dambekalns over 5 years ago
- Project changed from TYPO3.Flow to TYPO3.Fluid
- Category deleted (
MVC)
#2 Updated by Sebastian Kurfuerst about 4 years ago
- Status changed from New to Closed
fixed until now.