-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Error messages displayed twice with form type "sonata_type_native_collection" and "error_bubbling" sets to false #2761
Comments
This issue is very old. Can you please check this against the latest master version? Feel free to close if you don't use this bundle anymore or the issue is fixed. |
I use sonata-project/admin-bundle 3.16.0. This bug has not been fixed yet. |
Did anyone found any solution for this problem ? |
@ketamina96, add this code to form theme: {% block sonata_type_native_collection_errors %}
{% if form.rendered %}
{{ form_errors(form) }}
{% endif %}
{% endblock %} |
@nadrshin it doesn't work. It still shown twice. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
…_native_collection" or "sonata_type_immutable_array" when "error_bubbling" sets to false fix sonata-project#2761
Admin class :
If validation fails for the field "aliases", the error message will be shown twice.
The first time comes
sonata_type_native_collection_widget
(https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/views/Form/form_admin_fields.html.twig#L230), the second time fromform_row
(https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/views/Form/form_admin_fields.html.twig#L200).I think we have to delete the call to
form_errors
in thesonata_type_native_collection_widget
becausesonata_type_native_collection_widget
is called fromform_row
.The text was updated successfully, but these errors were encountered: