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.

Comments

Susurrus’s picture

Status: Active » Needs review
StatusFileSize
new983 bytes

Not sure if this is the right way to do it, but I'm not very familiar with FAPI's inner workings.

damien tournoud’s picture

Status: Needs review » Needs work

I guess this is the wrong patch.

Susurrus’s picture

Status: Needs work » Needs review

Indeed it was. Here's the real one.

Susurrus’s picture

StatusFileSize
new942 bytes

Hopefully attaching a file isn't broken this time.

Susurrus’s picture

Assigned: Unassigned » Susurrus

Also mine.

Susurrus’s picture

Version: 6.x-dev » 7.x-dev
Assigned: Susurrus » Unassigned
Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

oadaeh’s picture

Your patch has at least one tab in it. You'll need to remove all of them before it will pass the testbot.

brianV’s picture

Status: Needs work » Needs review
StatusFileSize
new1.08 KB

Rerolled for HEAD, no tabs.

Status: Needs review » Needs work

The last submitted patch failed testing.

zeropaper’s picture

I 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().

zeropaper’s picture

sorry... this one will be better

marcingy’s picture

Version: 7.x-dev » 8.x-dev
Assigned: Unassigned » marcingy
Issue tags: +Needs backport to D7

We 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.

marcingy’s picture

Status: Needs work » Needs review
StatusFileSize
new3.47 KB

Just keeping this focused on nodes - add limit validation errors and a test.

catch’s picture

Status: Needs review » Needs work
+class NodeDeletionTestCase extends DrupalWebTestCase {

I think the class needs PHPdoc, at least lots of tests have that.

+    // Check that we can access the delete page without filing in the required field.

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.

marcingy’s picture

Status: Needs work » Closed (duplicate)