Ich habe gerade konfiguriert und das FOSUserBundle auf meinem Symfony-Projekt vorbereitet. Aber wenn ich versuche, sieht das Register zu zeigen Ansicht wie:FOSUserBundle Formular sieht wie seltsam aus
Das Register Form (Standard) sollte wie folgt aussehen:
Alles, was ich konfiguriert habe, ist auf Documentation, ich weiß nicht, was passiert ist.
Dies ist der RegistrationFormType.html.twig von FOSUserBundle:
class RegistrationFormType extends AbstractType
{
...
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('email', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\EmailType'), array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle'))
->add('username', null, array('label' => 'form.username', 'translation_domain' => 'FOSUserBundle'))
->add('plainPassword', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\RepeatedType'), array(
'type' => LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\PasswordType'),
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => 'form.password'),
'second_options' => array('label' => 'form.password_confirmation'),
'invalid_message' => 'fos_user.password.mismatch',
))
;
}
...
}
müssen Sie einen Blick auf https://symfony.com/doc/current/templating/overriding.html – zizoujab
Vielen Dank für Ihre Antwort, wie @ michal-g sagte, musste ich diese Zeile auskommentieren. Ich habe den überwiegenden Teil zuvor getan, um dieses Problem zu finden. – Mich