我尝试覆盖寄存器Action控制器,但出现错误形式(例如,不显示重复的电子邮件,并且在操作中出现此错误symfony的错误500:
代码控制器:
{% trans_default_domain 'FOSUserBundle' %}
<div class="justify-content-center row">
<div class="col-md-8">
{{ form_start(form, {'method': 'post', 'action': path('new_custom'), 'attr': {'class': 'fos_user_registration_register'}, 'attr':{'id': 'regForm'}}) }}
<div class="form-group">
{{ form_widget(form.email,{ 'attr': {'class': 'form-control','placeholder': 'Email'}}) }}
{{ form_errors(form.email) }}
</div>
<div class="form-group">
{{ form_widget(form.plainPassword.first,{ 'attr': {'class':'form-control' ,'placeholder': 'Password'} }) }}
{{ form_errors(form.plainPassword.first) }}
</div>
<div class="form-group">
{{ form_widget(form.plainPassword.second,{ 'attr': {'class':'form-control' ,'placeholder': 'Repeat your password'} }) }}
{{ form_errors(form.plainPassword.second) }}
</div>
<div class="form-group float-right" style="margin-top: 2%">
<input type="submit" class="submitRegister btn btn-primary" value="{{ 'registration.submit'|trans }}" />
</div>
<div class="form-group float-left">
<a class="loginInRegister nav-link" data-toggle="modal" data-target="#modalLogin">
<input type="submit" class="btn btn-primary" value="Login" />
</a>
</div>
{{ form_end(form) }}
</div>
</div>
<script src="{{ asset('js/main.js') }}"></script>
代码视图:
{{1}}
如何以形式显示错误并且不显示状态为500的错误symfony和路由器fosuserbundle以进行默认工作,但是当我覆盖寄存器控制器时出现此错误:(