Problem/Motivation

Original IS - Currently Actions module allow to create entities only for plugins that implements PluginFormInterface. This is confusing. In common case action plugin can have zero configuration and as result no form for this.

Steps to reproduce

Create a new Action plugin that does not implement PluginFormInterface
Enable the actions module
Go to the action configuration page
Verify the new action does not display as an option to create a new action.

Proposed resolution

Remove check if the action implements PluginFormInterface

Remaining tasks

CR snippet.

User interface changes

Actions that do not implement PluginFormInterface will now be able to be created on the Actions configuration page.

API changes

None

Data model changes

None

Release notes snippet

Still to do

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

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.

Chi’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
Chi’s picture

Chi’s picture

Issue tags: -Needs reroll

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.

andypost’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
kostyashupenko’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.

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.

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.

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.

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.

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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.

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.

DanielVeza’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

I think this totally makes sense. Even more so when #2815297: Actions module should allow to edit and remove non-configurable actions lands. For example, if the default "Unpublish taxonomy term" action is deleted, without this patch it can't be added back in via the UI.

+++ b/core/modules/action/src/Form/ActionAdminManageForm.php
@@ -53,9 +53,7 @@ public function getFormId() {
+      $actions[$id] = $definition['label'] . '...';

I don't think we need the ... at the end of this. Is there any reason thats needed that I might be missing?

This needs tests too. It still applies to 10.1.x, I've queued a 10.x.1 test run against the latest patch

Chi’s picture

The ellipsis has been removed in upstream long time ago. See #2763433: Hardcoded ellipsis in actions configuration form. The patch needs to be updated accordingly.

DanielVeza’s picture

Removed the ellipsis and added a test for this. I used an existing action from the user module for this to stop us needing to create a new test module with one action in it. Happy to create a new module if thats preferred. Just feels like more code to maintain for minimal benefit.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs change record

Seems like such a feature will require a change record so others will know they can now create plugins without implementing PluginFormInterface

Would be nice to have an issue summary update that the proposed solution is to remove the check for PluginFormInterface completely. But not going to tag for it.

DanielVeza’s picture

Issue summary: View changes
DanielVeza’s picture

Status: Needs work » Needs review

Updated the IS and added a change record - Leaving the tag so it can be reviewed.

https://www.drupal.org/node/3340772

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record

Change record looks good to me.

Will move this along

  • catch committed f38c2393 on 10.1.x
    Issue #2815301 by Chi, DanielVeza, kostyashupenko, smustgrave: Allow to...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

quietone’s picture

Published the CR.