symfony/symfony — Issue #2548: [Symfony2]Rendering error
Author: Kosmonaft
Created: 2011-11-02 20:01:28+00:00
State: open

Hello.
I need a help. I`m trying to fix this problem 3 days without any success :(
I have Registration page. In this page I use JScript to create two boxes. First is for User, second for organization.
When I create a route to this page I set action from controller for user registration. I can`t define two actions so for second one I use rendering controller ({% render "AidfConaBundle:Form:rejestracjaOrganizacji"%}).
So in this way I can see in one page two forms( which are changing using JScript).
When I register User everything work. Errors, confirmation and etc.
Unfortunately the problem are with my rendered action( form).
If I submit form and I have some error the Symfony is getting me back to the registration form but automatic to first box(which is user registration) if I select second(Organization box) I see where I make mistakes(error) and I can change it. Then when I don`t have error fields and everything must work without any problems symfony show me this error page:
An exception has been thrown during the rendering of a template ("Error when rendering "http://156.17.130.97/Symfony/web/app_dev.php/rejestracja" (Status code is 302).") in "AidfConaBundle:Form:rejestracjaUzytkownika.html.twig" at line 180.

On this line I have my rendered controller({% render "AidfConaBundle:Form:rejestracjaOrganizacji"%}).
I was thinking that problem is that in my

I don`t make any action. So I make such a combination with organization

that everything work. But I have next error :( If I have some error new generation page don`t extends any CSS and etc.( because when I use thus rendered controller I make only a simply form view because after rendering this form will be insert the Registration page.)

pls help me :)