Dynamically provide action plugins for every moderation state change

Created on 9 September 2016, over 8 years ago
Updated 20 February 2023, almost 2 years ago

Updated #65

Problem/Motivation

  • Install content_moderation
  • Apply the "Editorial" workflow to articles.
  • Create an article node in the published workflow state.
  • Goto /admin/content
  • Use the bulk action "Unpublish content" on the article node.
  • You will see this validation error:

Proposed resolution

  • Remove the publish/unpublish action
  • Provide action plugins for every state
  • Dynamically create/update/delete action instances when workflow settings are changed.
  • Update moderation_content admin view with the state actions.

Remaining tasks

Dynamically create/update/delete action instances when:

  • create/update/delete operation happens on a workflow entity by implementing hook workflow (insert|update|delete).
  • changes to the workflow entity happen during config import.
  • changes to the workflow entity are done hook_update_N.

Update moderation_content admin view with the state actions.
Add functional test for both cases.

User interface changes

moderation_content admin view will have state change actions.

API changes

No API change only addition.
Adds new moderation state change action and deriver.

Data model changes

None.

📌 Task
Status

Needs review

Version

10.1

Component
Content moderation 

Last updated 20 days ago

Created by

🇩🇪Germany dawehner

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • VDC

    Related to the Views in Drupal Core initiative.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India _pratik_ Banglore

    hi,

    Patch Not working for 9.5.1,
    i am able to publish/unpublish specifically, but not able to do using bulk operations.
    any working patch available ?

    thanks

  • Status changed to Needs work almost 2 years ago
  • 🇺🇸United States smustgrave

    Self review

    For Drupal 10 applying the patch no longer seeing the options appear.

    Issue summary may need to be updated for how to get to show.

  • 🇳🇿New Zealand klidifia

    Any info regarding the issues in 9.5.1 / 10? Have only tested in 9.4.10 just now -- I applied #215 and it works, however:

    I am not sure why there is an access check for the user having edit permissions for the node in question. The permission controlling this functionality should be solely the transition permissions within Content Moderation, like it is with the Content Moderation form that appears on a node (the user does not need edit permissions in order to use that form and transition the node using that form).

  • 🇺🇸United States daniel korte Brooklyn, NY

    Patch #218 not working for 9.5.4

  • last update over 1 year ago
    Custom Commands Failed
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.0 & MySQL 5.7
    last update over 1 year ago
    Custom Commands Failed
  • 🇺🇸United States beunerd Providence, Rhode Island

    Confirming that the patch in #218 📌 Dynamically provide action plugins for every moderation state change Needs work works on Drupal 9.5.8.

    Not sure what might have been going on for @daniel-korte with 9.5.4.

  • 🇺🇸United States daniel korte Brooklyn, NY

    Yup, disregard #219. It was a configuration issue on my end.

  • 🇮🇳India Parashram

    Can someone confirm if #218 📌 Dynamically provide action plugins for every moderation state change Needs work works on Drupal 10 or any other update around for D10?

  • 🇨🇦Canada joseph.olstad

    @Parashram, the moderated_content_bulk_publish module allows similar functionality and is compatible with Drupal 10.
    Brief explanation; if you have an out of the box workflow, use 2.0.x, however if you have a custom workflow try 3.0.x and adjust the configuration as necessary to fit your workflow.
    Check the readme 2x and the project page for more information.

  • 🇺🇸United States ec-adam

    I can confirm that the patch in #218 works very well in Drupal 10.1.1, PHP 8.1.8!

    I tested as an admin and as a user who does not have permission to change to the state they tried to bulk update to. The only thing that seemed a little strange (to me at least) was that the access denied message for the user without permissions came after the bulk operation looked like it had run. Seems like a little better UX to have the message appear before the running the operation (perhaps when the user clicks Apply on the moderation state action screen).

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    Custom Commands Failed
  • Status changed to Needs work about 1 year ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • last update about 1 year ago
    Custom Commands Failed
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India pradhumanjainOSL

    Try to fix deprecation errors.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    30,687 pass, 8 fail
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Dynamically create/update/delete action instances when:

    create/update/delete operation happens on a workflow entity by implementing hook workflow (insert|update|delete).
    changes to the workflow entity happen during config import.
    changes to the workflow entity are done hook_update_N.

    According to the issue summary this still needs to be done or marked complete.

  • 🇫🇷France andypost

    Is there need to keep configurable actions in core? In context of 📌 [PP-1] Move configurable user actions to the actions module Active

  • 59:12
    54:22
    Running
  • 🇩🇪Germany demonde

    Will this issue be fixed anytime soon?

    I have a request where I would like to use content moderation but I cannot do this without bulk operations in the content admin page.

  • First commit to issue fork.
  • Pipeline finished with Failed
    5 months ago
    Total: 241s
    #224920
  • 🇺🇸United States joegraduate Arizona, USA

    Created a new MR based on 11.x using the patches from #218 and #228 to trigger GitLab CI checks and to make addressing the remaining tasks easier.

    Leaving status as "Needs work" for #229.

  • Pipeline finished with Failed
    5 months ago
    Total: 172s
    #224932
  • Pipeline finished with Failed
    5 months ago
    Total: 3227s
    #224948
  • Pipeline finished with Canceled
    5 months ago
    Total: 100s
    #225117
  • Pipeline finished with Canceling
    5 months ago
    #225119
  • Pipeline finished with Failed
    5 months ago
    Total: 170s
    #225120
  • Pipeline finished with Failed
    5 months ago
    Total: 175s
    #225223
  • Pipeline finished with Failed
    5 months ago
    Total: 567s
    #225225
  • Pipeline finished with Failed
    5 months ago
    Total: 527s
    #225895
  • Pipeline finished with Canceled
    5 months ago
    Total: 435s
    #225998
  • Pipeline finished with Failed
    5 months ago
    Total: 515s
    #226003
  • Pipeline finished with Failed
    5 months ago
    Total: 501s
    #226032
  • Pipeline finished with Failed
    5 months ago
    Total: 569s
    #226050
  • Pipeline finished with Failed
    5 months ago
    Total: 514s
    #226058
  • Pipeline finished with Failed
    5 months ago
    Total: 465s
    #226098
  • Pipeline finished with Failed
    5 months ago
    Total: 454s
    #226122
  • Pipeline finished with Failed
    5 months ago
    Total: 186s
    #226143
  • Pipeline finished with Failed
    5 months ago
    Total: 481s
    #226145
  • Pipeline finished with Failed
    5 months ago
    Total: 535s
    #226185
  • Pipeline finished with Failed
    5 months ago
    Total: 462s
    #226223
  • Pipeline finished with Failed
    5 months ago
    Total: 464s
    #226242
  • Pipeline finished with Failed
    5 months ago
    Total: 447s
    #226265
  • 🇬🇧United Kingdom altcom_neil

    Hi,

    Thanks for everyone's work on this so far.

    Just creating a fixed diff file from the last commit 2643761b so we can test this in multiple development environments (Drupal 10.3.5 / PHP 8.2.18).

  • 🇮🇳India gaurav_manerkar Vasco Da Gama, Goa

    Hi,

    I have moved content_moderation_update_110001 to `content_moderation.post_update.php` file to prevent any feature conflict with hook_update_N implementations

Production build 0.71.5 2024