Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Exception caught by form: No file decorator found... #107

Open
jimmykane opened this issue Jan 30, 2014 · 4 comments
Open

Warning: Exception caught by form: No file decorator found... #107

jimmykane opened this issue Jan 30, 2014 · 4 comments

Comments

@jimmykane
Copy link

Regarding issue #6 this bug is back again with v3 of the bootstrap.
We were using v2 so far and recently we upgraded to v3 of the library. This broke the file element, and the issue we are having is exactly the one described in issue #6

@magnuspwhite
Copy link

The issue is being caused by the same problem as before.

Twitter_Bootstrap_Form_Element_File has a fuction _existsFileDecorator which is returning false. It calls $this->getDecorators() which does not return any elements.

loadDefaultDecorators should then be adding the decorator File which does work.

A var_dump after the decorator has been set.

array(1) { ["Zend_Form_Decorator_File"]=> object(Zend_Form_Decorator_File)#195 (5) { ["_attribBlacklist":protected]=> array(4) { [0]=> string(6) "helper" [1]=> string(9) "placement" [2]=> string(9) "separator" [3]=> string(5) "value" } ["_placement":protected]=> string(6) "APPEND" ["_element":protected]=> NULL ["_options":protected]=> array(0) { } ["_separator":protected]=> string(1) " " } }

I do not know why Zend is not they recognising that the decorator exists.

@jimmykane
Copy link
Author

If you debug carefully and see my pull request you will find that this is not a zend issue. The function that has a double function is called setElementDecorators from ZF that creates weird behaviour with TBF. Sorry I am pretty sick this week and cannot retrace/redebug the procedure to explain more.

Use pull request #109 to fix this issue. @magnuspwhite

@magnuspwhite
Copy link

@jimmykane thanks for the fix, just need to fix the decorator now.

@jimmykane
Copy link
Author

In issue #6 @theUniC Shows a demonstration on how to use this. I done the same and with the fix it works. @magnuspwhite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants