Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Having an unpublish date in the past prevents from deleting the node.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2627370_14.delete_node_with_past_date.7x.patch | 646 bytes | jonathan1055 |
| |||
#11 | 2627370_11.delete_node_with_past_date.7x.patch | 4.79 KB | jonathan1055 |
| |||
#7 | 2627370_7.delete_node_with_past_date.8x.patch | 5.99 KB | jonathan1055 |
|
Comments
Comment #2
Xen CreditAttribution: Xen at Reload commentedAttached patch fixes around this issue.
Comment #3
jonathan1055 CreditAttribution: jonathan1055 commentedHi Xen,
Thanks very much for noticing this, and for the patch. It's odd because I'm sure we did some work on bypassing the validation when deleting a node.
We will have to check that this problem is fixed in our 8.x development first, so I might add a test (in 7.x and 8.x) to cover this case, then it cannot get forgotten.
Jonathan
Comment #4
Xen CreditAttribution: Xen at Reload commentedA patch for those that need to patch 1.2.
Comment #7
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI've checked 7.x and yes, this is definitely a bug. The work we did previously was to make sure nodes could be deleted when the 'required' field options were set, but we did nothing about dates in the past.
At 8.x the code works differently, and the 'delete' button is now a link which works fine, so there is no problem at 8.x. However, I have expanded the test coverage at 8.x to make sure this does not regress. When this patch passes, I'll commit the tests at 8.x then add tests and patch at 7.x
Comment #9
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedNow that the 8.x tests are commited, here is the expanded 7.x test. This patch should fail the deletion tests, as the code fix is not included here.
Comment #11
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAs expected, #9 failed the new tests. Now the tests plus code fix. This should pass.
Comment #13
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented@xen Thank you for finding this and for providing the initial patch.
Committed and fixed.
Jonathan
Comment #14
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI noticed later that it is not sufficient to just skip Scheduler's own validations when deleting the node. If using Date Pop-up then there can already be errors flagged on the form, which prevent deletion. Here is a small addition which solves this.
Comment #16
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAs before, this fix is not required for 8.x