This means that if somehow data doesn't exist for some required fields (generally from direct manipulation in the database), this data needs to be populated with random data in order for the node to be deleted. This doesn't make much sense as if the node is about to be deleted, this updated information shouldn't be relevant and therefore shouldn't be required.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | node_form_validation-265259-14.patch | 3.47 KB | marcingy |
| #12 | 265259.form_node_validation_on_delete_2.patch | 1.37 KB | zeropaper |
| #11 | 265259.form_node_validation_on_delete.patch | 1.33 KB | zeropaper |
| #9 | 265259-node-form-validate-on-delete.patch | 1.08 KB | brianV |
| #4 | form.patch | 942 bytes | Susurrus |
Comments
Comment #1
Susurrus commentedNot sure if this is the right way to do it, but I'm not very familiar with FAPI's inner workings.
Comment #2
damien tournoud commentedI guess this is the wrong patch.
Comment #3
Susurrus commentedIndeed it was. Here's the real one.
Comment #4
Susurrus commentedHopefully attaching a file isn't broken this time.
Comment #5
Susurrus commentedAlso mine.
Comment #6
Susurrus commentedAlso referenced here: #308352: Allow revision log messages to be required.
Comment #7
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #8
oadaeh commentedYour patch has at least one tab in it. You'll need to remove all of them before it will pass the testbot.
Comment #9
brianV commentedRerolled for HEAD, no tabs.
Comment #11
zeropaperI think that the modification should not be made in the form.inc file but in the node_form() function instead.
If we use the patch in #9 (or similar solution) every form with a button "Delete" will not be validate (but we may need validation in some cases).
This new patch (265259.form_node_validation_on_delete.patch) only modifies the node_form().
Comment #12
zeropapersorry... this one will be better
Comment #13
marcingy commentedWe can add a form limit validation errors to the delete submit handler rather than altering the logic in the form.inc. This likely needs to happens with taxonomy and user deletes as well as they are fieldable. I'll try and get this sorted, we are also going to need to make sure that the data for the confirmation page is available as validation limits restrict what is posted.
Comment #14
marcingy commentedJust keeping this focused on nodes - add limit validation errors and a test.
Comment #15
catchI think the class needs PHPdoc, at least lots of tests have that.
typo - filing vs. filling.
Otherwise this looks great.
I'm sure there is another issue for the same bug somewhere, will have a quick look.
11 days to next Drupal core point release.
Comment #16
catchFound it - #216064: Entity form "Delete" button triggers server-side + HTML5 form validation; change "Delete" button to a link.
Comment #17
marcingy commented