Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#13 | forum-confirm-1946414.13.interdiff.txt | 2.78 KB | larowlan |
#13 | forum-confirm-1946414.13.patch | 8.67 KB | larowlan |
#9 | forum-confirm-1946414.9.patch | 9 KB | larowlan |
#8 | forum-confirm-1946414.8.patch | 9.45 KB | larowlan |
#2 | forum-confirm-1946414.1.patch | 8.91 KB | larowlan |
Comments
Comment #1
larowlanComment #2
larowlanso this
a) converts the confirm form to use ConfirmFormBase/FormInterface
b) Ditches the old $_POST foo for the delete operation (welcome to Drupal 5 forum module, this is form api, form api this is forum).
c) adds a new route for the delete callback (yes there is no path for it at the moment, it is just tied up in some funky $_POST variables)
d) moves the save submit handler on the edit form to the button instead of the form
e) removes the ?destination= hardcoded in the edit form (this might be an issue for taxonomy conversions too), unless they use drupal_goto (which is smelly)
f) adds some more tests for this
g) drops the 'Add container' 'Add forum' local tasks on the delete form (and adds tests for that).
Comment #3
andypostAwesome!!!
g) seems a bit tricky :)
Comment #4
xjm#2: forum-confirm-1946414.1.patch queued for re-testing.
Comment #5
Crell CreditAttribution: Crell commentedWhy is this still a function and not a method?
Comment #6
larowlan@Crell this issue is to deal with the confirm_form(), that will be fixed in #1951278: Create taxonomy term form controller for forum terms (ie not default) and use that for admin/structure/forum/edit/{forum|contain
Comment #7
larowlanThis is blocking #1951278: Create taxonomy term form controller for forum terms (ie not default) and use that for admin/structure/forum/edit/{forum|contain
Comment #8
larowlanChasing HEAD
Comment #9
larowlanPatch 8 had hunk from another issue
Comment #10
webchickThis is only blocking a normal task, so downgrading to normal. I'll try and look at this over the weekend.
Comment #11
tim.plunkettThe changes to forum_form_main() look a little odd in the patch, but make sense when you apply it and read it.
The rest of it is pretty straightforward.
Comment #12
alexpottCan we not just not set $form['#submit'] as you've done in forum_form_container()?
No fullstop and could do with @see \Drupal\forum\Form\DeleteForm
These can all be changed to {@inheritdoc} - see http://drupal.org/coding-standards/docs#inheritdoc
Comment #13
larowlanFor some reason I thought the form id and the submit handler lined up (If $form['#submit'] is not set, Drupal will automatically add {form_id}_submit as the submit handler - Forcing it to an empty array avoids this behaviour). But in this case the form id is forum_form_forum() and the submit handler is forum_form_submit(). Fixed.
Hopefully phpcs can sniff for these, currently the new format throws warnings when I run the coding standards.
All other issues fixed.
Comment #14
tim.plunkettAh, that's an improvement. Thanks!
Comment #15
alexpottCommitted 8743406 and pushed to 8.x. Thanks!