Problem/Motivation

All of the functionality of actions is contained within Drupal\Core\Action

The action.module only provides the UI.

Proposed resolution

As this module is just providing a UI in the same way as menu_ui.module, views_ui.module, and field_ui.module, rename to action_ui.module

Remaining tasks

#2811663: Rename Action module to Actions UI in the UI and in comments

#3067299: Move actions migrations and tests to system module
#3022401: Remove useless config action.settings.recursion_limit
#3022399: Move action_views_form_substitutions() out of actions module
#2815379: Move message, goto, and email action plugins to Drupal\Core\Action

User interface changes

N/A

API changes

N/A, the action module does not provide an API.

Data model changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
22.16 KB

We had some stale code as well, its nice to clean this up.

Status: Needs review » Needs work

The last submitted patch, action_ui-2083649-1.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review

#1: action_ui-2083649-1.patch queued for re-testing.

tim.plunkett’s picture

Title: Rename action module action_ui » Rename action module to action_ui
FileSize
2.54 KB
24.29 KB

Btw, no upgrade path is needed because action.module was new to D8 (previously includes/actions.inc).
Rerolled now #2082499: Uninstalling action module removes actions created by the user module is in.

Status: Needs review » Needs work

The last submitted patch, action_ui-2083649-4.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review

#4: action_ui-2083649-4.patch queued for re-testing.

tim.plunkett’s picture

Issue summary: View changes
Issue tags: +beta target, +rename module

Tagging.

tim.plunkett’s picture

Issue tags: +Needs reroll
star-szr’s picture

Issue tags: +DrupalWorkParty

Tagging for reroll.

roma7’s picture

1: action_ui-2083649-1.patch queued for re-testing.

The last submitted patch, 1: action_ui-2083649-1.patch, failed testing.

roma7’s picture

4: action_ui-2083649-4.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 4: action_ui-2083649-4.patch, failed testing.

roma7’s picture

roma7’s picture

Assigned: Unassigned » roma7
roma7’s picture

FileSize
22.29 KB
longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
roma7’s picture

FileSize
23.97 KB

Status: Needs review » Needs work

The last submitted patch, 18: action_ui-2083649-18.patch, failed testing.

The last submitted patch, 18: action_ui-2083649-18.patch, failed testing.

The last submitted patch, 16: action_ui-2083649-16.patch, failed testing.

The last submitted patch, 16: action_ui-2083649-16.patch, failed testing.

roma7’s picture

FileSize
24.37 KB
roma7’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 23: action_ui-2083649-23.patch, failed testing.

roma7’s picture

Status: Needs work » Needs review
FileSize
24.37 KB

Status: Needs review » Needs work

The last submitted patch, 26: action_ui-2083649-26.patch, failed testing.

roma7’s picture

Status: Needs work » Needs review

26: action_ui-2083649-26.patch queued for re-testing.

dawehner’s picture

Let's us write a proper issue summary here.

index bdd7c0f..0000000
--- a/core/modules/action/action.api.php

--- a/core/modules/action/action.api.php
+++ /dev/null

@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @file
- * Hooks provided by the Actions module.
- */
-
-/**
- * Executes code after an action is deleted.
- *
- * @param $aid
- *   The action ID.
- */
-function hook_action_delete($aid) {
-  db_delete('actions_assignments')
-    ->condition('aid', $aid)
-    ->execute();
-}
diff --git a/core/modules/action/config/action.settings.yml b/core/modules/action/config/action.settings.yml

This hook is indeed not called anymore.

roma7’s picture

Assigned: roma7 » Unassigned
alexpott’s picture

I'm now wondering if this rename is actually correct - with fields_ui and views_ui it is possible to configure views and fields and then disable or completely remove these modules. However with actions this would not be the case since there are plugins in the module and any configured action that relied on them would not work once the module is disabled.

tim.plunkett’s picture

Ugh, that's my fault.
EmailAction, GotoAction, and MessageAction used to be in system module, and I moved them to action module.
That was wrong. They should be moved to \Drupal\Core (preferred), or even back to system (if needed).

sun’s picture

#1008166: Actions should be a module explains why all of this code was moved out of system.module.

Separating the UI into a action_ui.module would make sense to me — would be in line with #2085243: Rename Menu module into Menu UI module

If it's possible to move the API functionality into a Drupal\Core component, then that might make sense...

However, part of the reason for action.module was that not every Drupal site has a need for configurable actions functionality. → A module can be kept disabled.

Lastly, it looks like there's still a bug in the action synchronization code... Apparently, the active config directory of my local dev site contains plenty of action config files, but I'm confident that I never configured any actions. I remember that I stumbled over that problem in the original issue already.

tim.plunkett’s picture

We still don't have entity types in Drupal\Core, still haven't revisited it.

Unlike some of the other module move/renames, this is a perfect 1:1 move, as all of the non-UI functionality is already moved out.

Also, the config you weren't expecting came from user_user_role_insert().

dawehner’s picture

26: action_ui-2083649-26.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 26: action_ui-2083649-26.patch, failed testing.

daffie’s picture

I think this good for DX. But it is to late to get it into 8.0.0. I think that it is not a good idea to move it to 8.1.x for BC reasons. So lets move this one to 9.x-dev

jian he’s picture

Version: 8.0.x-dev » 9.x-dev
xjm’s picture

Issue tags: -beta target
catch’s picture

Version: 9.x-dev » 8.3.x-dev

This could be done in 8.x with a bc layer, it'd be horrible but it would allow 9.x to just drop that bc layer rather than introducing a new bc break.

dawehner’s picture

A first minor step, but maybe important for many people would be to change the label/description of it actually describe what its doing. In this case we would describe that it provides the UI for what is provided by system module by default.

naveenvalecha’s picture

A first minor step, but maybe important for many people would be to change the label/description of it actually describe what its doing.

Agreed with daniel, The first step would be the do the changes in UI and in comments. Filed a followup for it #2811663: Rename Action module to Actions UI in the UI and in comments
Then internals like Forms, Controllers in one issue then @api classes

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

andypost’s picture

It is not clear from summary why rename makes sense except same-looking naming pattern

tim.plunkett’s picture

Issue summary: View changes
andypost’s picture

@tim.plunkett IS not actually true because all configurable actions are defined in system module
So probably better to wait for #2815379: Move message, goto, and email action plugins to Drupal\Core\Action

tim.plunkett’s picture

Issue summary: View changes
Status: Needs work » Postponed
Issue tags: -DrupalWorkParty, -Needs issue summary update

Agreed, thought that had landed

andypost’s picture

Status: Postponed » Needs work

Now unblocked, is there reason yo split this into #2811663: Rename Action module to Actions UI in the UI and in comments

andypost’s picture

andypost’s picture

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Issue tags: +Needs reroll
andypost’s picture

Mixologic’s picture

Renaming core modules has the side effect of causing core's own dependency checking to fail if a contrib module already had a dependency on the module.

There's about 14 modules on drupal.org that have a dependency on drupal:action, for example: https://git.drupalcode.org/project/commerce_bulk/blob/8.x-1.x/commerce_b...

Or
https://git.drupalcode.org/project/commerce_inventory/blob/8.x-1.x/comme...

Is there some way to provide a BC layer for renames like this?

tim.plunkett’s picture

I'm not sure how best to handle that BC. But both of those modules (and any others) can remove that dependency. The Action system is in Drupal\Core\Action and is not separate from drupal/core, so that declaration is pointless. (I checked, neither module alters the Action UI directly, which is what the module provides)

andypost’s picture

Checked the modules in #58 they wrongly depends on actions instead 1) depends on views for "vbo"

Mixologic’s picture

Those were just example modules. Maybe the other 12 are similar.

What happens to a module that declares a dependency on 'drupal:action' if that module gets renamed on an upgrade? Does that module no longer run? Does it uninstall itself? What does the modules page do with that situation? Or, does it likely not matter and pretty much any module with a dependency on action already has it satisfied, regardless of whether or not the action module is enabled?

vacho’s picture

Issue summary: View changes

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

andypost’s picture

Issue summary: View changes

2 blockers left, today accepted #3022401: Remove useless config action.settings.recursion_limit

PS issues are ordered in summary

karthik.arumugam’s picture

karthik.arumugam’s picture

Status: Needs work » Needs review

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jungle’s picture

Status: Needs review » Needs work

About BC, how about keeping a simplest action module in core, adding actions_ui as a dependency with a .info.yml file and an empty .module, then marking it deprecated.

andypost’s picture

@jungle no reason, action entity in system module but should be part of core (when it was created there was no ability to provide entities in core namespace)

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

sanjayk’s picture

#65 successfully apply on 9.2. Just running test cases for 9.2 on #65

anmolgoyal74’s picture

Fixed CS issues.

Status: Needs review » Needs work

The last submitted patch, 72: rename_actionui-2083649-72.patch, failed testing. View results

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Gábor Hojtsy’s picture

If we still want to do this in Drupal 10 despite the composer problems outlined by @Mixologic in #58 and #61?

If so, the parent should be changed to #3118154: [meta] Deprecate dependencies, libraries, modules, and themes that will be removed from Drupal 10 core by 9.4.0-beta1 and work on the Drupal 9 branch should be done to prepare for this. Then another issue should be opened parented to #3213858: [META] Remove deprecated modules and themes from the Drupal 10 branch so the actions module can be removed in Drupal 10.

andypost’s picture

Version: 9.3.x-dev » 9.4.x-dev
penyaskito’s picture

What about a mix of #68 + an update_hook for enabling action_ui if action is enabled?

We can create an issue on those 14 modules for removing the dependency.

Then for D10, we can just remove action module. They will need to take care of the dependencies before/when D10 is released, but that would be acceptable (they probably will need to update their core_version_requirement at least anyway)

andypost’s picture

Good idea and right time, ++ to #77

andypost’s picture

andypost’s picture

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ajaypratapsingh’s picture

Status: Needs work » Needs review
FileSize
57.74 KB

rerolled patch

ajaypratapsingh’s picture

Sorry previous patch #82 have a wrong patch name(issue no.)

Munavijayalakshmi’s picture

Assigned: Unassigned » Munavijayalakshmi
Status: Needs review » Needs work
Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
FileSize
59.14 KB

Rectified all custom command failed errors, except following
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig core/modules/action_ui/

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/src/ActionListBuilder.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
117 | WARNING | Variable $build inside unset call is undefined.
--------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/lib/Drupal/action_ui/ActionListController.php
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
118 | WARNING | Variable $build inside unset call is undefined.
----------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/lib/Drupal/action_ui/Tests/ConfigurationTest.php
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
34 | ERROR | [x] Visibility must be declared on method "testActionConfiguration"
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/action_ui.info.yml
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
-----------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/action_ui.views_execution.inc
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
13 | WARNING | Do not use check_plain() on string literals, because they cannot contain user provided text
------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/tests/src/Functional/ConfigurationTest.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
10 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/tests/src/Unit/Menu/ActionLocalTasksTest.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Doc comment short description must start with a capital letter
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/tests/fixtures/update/drupal-8.action-3022401.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------
35 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
-------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vb/drupal-3299800/core/modules/action_ui/tests/action_form_ajax_test/action_form_ajax_test.info.yml
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
-----------------------------------------------------------------------------------------------------------------------

Time: 722ms; Memory: 12MB

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig core/modules/comment/lib/

FILE: /var/www/html/vb/drupal-3299800/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------
33 | ERROR | [x] Visibility must be declared on method "testCommentPublishUnpublishActions"
53 | ERROR | [x] Visibility must be declared on method "testCommentUnpublishByKeyword"
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

Time: 93ms; Memory: 10MB

ravi.shankar’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
59.22 KB
1.76 KB

Addressed Drupal CS issues of patch #85 and removed needs reroll tag.

Status: Needs review » Needs work

The last submitted patch, 86: 2083649-86.patch, failed testing. View results

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Needs work » Closed (outdated)
Related issues: +#3266458: [Policy] Deprecate Action (UI) module in D10 and move to contrib in D11

The Actions Module is now approved for removal from core, #3266458: [Policy] Deprecate Action (UI) module in D10 and move to contrib in D11. Doing further work, such as renaming it are now outdated.

Thank you to everyone who worked to complete this issue!