This failure is raised when you delete the file decorator for example by
using setDecorator().
Without the file decorator the file element can not be rendered correct.
Note that visibility and rendering are two different things.
This means that your file element has not worked before, or that you added
something.
When you overwrote the default decorators with setDecorator() you should
simply add the file decorator to the file element manually.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Bart McLeod" <[email protected]>
To: "fw-general" <[email protected]>
Sent: Monday, February 09, 2009 4:26 PM
Subject: [fw-general] file decorator not found, while present in latest
trunk
both calls do no longer work in latest trunk:
$image = $this->createElement('file', 'image_upload', array('label'
=> 'image'));
NOR
$image = new Zend_Form_Element_File('image_upload', array('label'
=> 'image'));
This is the error:
Exception caught by form: No file decorator found... unable to render file
element
Stack Trace:
#0 E:\ZendFramework\library\Zend\Form\Decorator\FormElements.php(101):
Zend_Form_Element_File->render()
#1 E:\ZendFramework\library\Zend\Form.php(2595):
Zend_Form_Decorator_FormElements->render('')
#2 E:\ZendFramework\library\SpaceCMS\Form.php(46): Zend_Form->render(NULL)
#3 E:\werk\cuddlefish\application\admin\models\forms\FormItem.php(93):
SpaceCMS_Form->render(NULL)
#4 E:\ZendFramework\library\Zend\Form.php(2610): FormItem->render()
#5 E:\werk\cuddlefish\application\admin\views\scripts\items\form.phtml(1):
Zend_Form->__toString()
#6 E:\ZendFramework\library\Zend\View.php(107):
include('E:\werk\cuddlef...')
#7 E:\ZendFramework\library\Zend\View\Abstract.php(787):
Zend_View->_run('E:\werk\cuddlef...')
#8
E:\ZendFramework\library\Zend\Controller\Action\Helper\ViewRenderer.php(902):
Zend_View_Abstract->render('items/form.phtm...')
#9
E:\ZendFramework\library\Zend\Controller\Action\Helper\ViewRenderer.php(923):
Zend_ in <b>E:\ZendFramework\library\Zend\Form.php</b> on line
<b>2615</b><br />
While in the filesystem, I can see both the element and the decorator and
I have autoloading enabled....
Anyone? A few days ago, this element seemed to work, according to the
posts here.
Bart