title: Symfony2: Strange form behaviour
body: <p>I have written the reset action for symfony2 User reset password. Here is the code:</p>
  
  <pre><code>/**
   * @Route("/reset-password/{confirmationToken}", name="user_resetting_confirm")
   * @ParamConverter("confirmationToken", class="MyProjectBundle:User")
   * @param \My\Project\Entity\User $user
   * @Template()
   */
  public function resetAction(Request $request, $confirmationToken)
  {
      $form = $this-&gt;createFormBuilder()
              -&gt;add('password', 'repeated', array(
                      'type' =&gt; 'password',
                      'first_name' =&gt; 'New Password',
                      'second_name' =&gt; 'Confirm New Password',
                      'invalid_message' =&gt; 'Passwords don\'t match',
                      'error_bubbling' =&gt; true,
                  ))
      -&gt;getForm();
  
      if ('POST' == $request-&gt;getMethod()) {
          $form-&gt;bindRequest($request);
          $data = $form-&gt;getData();
  
  
          $user = $this-&gt;container-&gt;get('fos_user.user_manager')-&gt;findUserByConfirmationToken($confirmationToken);
  
          if (null === $user) {
              throw new NotFoundHttpException(sprintf('The user with "confirmation token" does not exist for value "%s"', $confirmationToken));
          }
  
          if (!$user-&gt;isPasswordRequestNonExpired($this-&gt;container-&gt;getParameter('fos_user.resetting.token_ttl'))) {
              return new RedirectResponse($this-&gt;container-&gt;get('router')-&gt;generate('fos_user_resetting_request'));
          }
  
          if ($form-&gt;isValid()) {
              $newPassword = $data['password'];
  
              $factory = $this-&gt;get('security.encoder_factory');
              $encoder = $factory-&gt;getEncoder($user);
              $password = $encoder-&gt;encodePassword($newPassword, $user-&gt;getSalt());
              $user-&gt;setPassword($password);
              $em = $this-&gt;get('doctrine')-&gt;getEntityManager();
              $em-&gt;persist($user);
              $em-&gt;flush();
              $this-&gt;authenticateUser($user);
              return new RedirectResponse($this-&gt;getRedirectionUrl($user));
          }
      }
  
      return $this-&gt;render('MyProjectBundle:Resetting:password_reset.html.twig',array('form' =&gt; $form-&gt;createView()));
  
  }
  </code></pre>
  
  <p>For some reason if i enter wrong passwords in both the fields and then submit i am getting a blank page with no html code.
  Is there any thing am doing wrong here?</p>