Two buttons are often presented on forms: save and delete. Clicking delete invokes form validation and does not proceed with deletion until fields contain valid entries. Valid entries should not be required since the item is just being deleted.
Proposed solution: don't invoke form validation for delete button.
To reproduce the issue:
1) add a field to a content type using the 'manage fields' tab (e.g. at /admin/structure/types/manage/article/fields add an entity reference field)
2) on the next screen (regarding data storage), select an entity type (e.g. Taxonomy term)
3) deliberately leave a required field blank (e.g. remove the value from the Label field)
3) click delete; note the error message (e.g. the popup saying "please fill out this field") and the fact that the page does not reload.
Comments
Comment #1
tim.plunkettThis seems related to #1797438: HTML5 validation is preventing form submit and not fully accessible
Comment #2
dddave CreditAttribution: dddave commentedYuck, this also happens in D7. I'd argue that this is a major problem not merely a normal one. Webmastering on drupal.org dramatically shows the impact it has on spam removal etc. Especially when removing older content which had required fields added later on this becomes completly tedious.
Comment #3
kattekrab CreditAttribution: kattekrab at Creative Contingencies commentedWould this be easy to fix? Could we sneak it in during RC?
Comment #4
DamienMcKennaThis was at least partly fixed in #216064: Entity form "Delete" button triggers server-side + HTML5 form validation; change "Delete" button to a link.
Comment #5
dddave CreditAttribution: dddave commentedJudging by https://www.drupal.org/node/216064#comment-8726949 this likely won't be fixed in D7. We should at least make sure that this is completely fixed in D8 then. (Mmmmh, do I finally find some time to play around with D8....)
Comment #6
dddave CreditAttribution: dddave commentedComment #17
quietone CreditAttribution: quietone at PreviousNext commentedI tested this on Drupal 9.4.x standard install and was not able to reproduce the problem using the steps in the Issue Summary. I was able to delete the taxonomy term reference without filling in the required field
Closing as outdated.