Convert this page callback to a new-style Controller, using the instructions on http://drupal.org/node/1800686

CommentFileSizeAuthor
#3 drupal-action-orphan-1939026-3.patch2.64 KBAlan Evans
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alan Evans’s picture

Looking into this.

Steps for testing/validation:

  1. Make sure comment module and actions module are enabled
  2. Visit the admin/config/actions page
  3. Disable comment module
  4. Visit admin/config/actions
  5. Visit dblog - find the " orphaned actions" records and click through to details
  6. Click the "remove orphaned actions" link
  7. You get redirected to the actions list - verify that actions from the disabled comment module are no longer present
  8. Note that user-configured comment actions may remain in the list. According to code comments this is "normal/expected" (though will give you a fatal error if you try to configure it, and behavior seems generally undefined at this point). This is probably a bug, but exists prior to this conversion.

For validation of the conversion, we'd need to ensure that the orphaned actions are removed in the same way as pre-conversion.

Alan Evans’s picture

... extending the validation steps: probably also worth checking what happens if you remove the "administer actions" permission.

Alan Evans’s picture

Status: Active » Needs review
FileSize
2.64 KB

Attaching a first stab at this ... As my first attempt at symfonic composition, I'm expecting a few disagreeable dissonances ;)

@Crell: assuming this one goes ok, do you own creation of issues for individual conversion tasks, or is it fair game to spot things needing conversion and do them (creating issues along the way)?

Alan Evans’s picture

(will add the newline at the end of the yml file, but waiting for other review comments first)

Alan Evans’s picture

(Probably needs merging with #1939024: Convert action_admin_manage to a new-style Controller at some point.)

Crell’s picture

Status: Needs review » Needs work

I have no monopoly on creating conversion issues! :-) If you want to make more, please be sure to link to the change notice and tag it with WSCCI-conversion and FormInterface if it's for a form.

+++ b/core/modules/action/lib/Drupal/action/Controller/ActionController.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\action\Controller;

Needs @file docblock.

+++ b/core/modules/action/lib/Drupal/action/Controller/ActionController.php
@@ -0,0 +1,24 @@
+    drupal_goto('admin/config/system/actions/manage');

This should be replaced with return new RedirectResponse(url('admin/config/system/actions/manage'));

Given how small this issue is, I'd agree with merging. Let's close this issue and just fold it into the linked issue for simplicity.

mtift’s picture

Status: Needs work » Closed (duplicate)