Support Moderation States for Taxonomy Terms

Created on 7 April 2025, about 1 month ago

Problem/Motivation

This module is very useful, but is currently hard-coded to work with nodes, even though the project page states that it works with the "workflow state of an entity".

Proposed resolution

It would be ideal if it were possible to be agnostic of the content entity being viewed, but I have a particular need to use this module with moderated taxonomy terms. I propose that the current condition plugin should be renamed to include the word "Node" and that we provide an additional plugin that will work with taxonomy terms.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mandclu
  • Merge request !2Add support for taxonomy terms → (Open) created by mandclu
  • 🇨🇦Canada mandclu

    The scope of changes in the MR may be wider than the maintainers are looking for, and if so I would be happy to tweak as needed. The changes in there do meet my need for creating a condition that works for moderated taxonomy terms, however.

  • 🇨🇦Canada nickdjm

    Yeah, it would be ideal for the 1 condition to apply to all entities, but I don't think there's a generic entity context.

    This change makes sense to me. I'll test it out in a couple of projects I have using this module and see how it goes!

  • 🇨🇦Canada mandclu

    Circling back on this, @nickdjm any chance you've had a chance to review this yet? I would really like to use this module in the Drupal Event Platform but I need something that supports taxonomy terms.

  • 🇨🇦Canada nickdjm

    Yes sorry, I got caught up in DrupalCamp Ottawa stuff.

    The changes look good, and testing in a fresh environment works well- however, we'll need an update hook for projects already using this module since we're removing moderation_state_condition_moderation_state and replacing it with node_moderation_state_condition_moderation_state.

  • 🇨🇦Canada mandclu

    I've added an update hook which fixed an existing block in my test environment. Please review.

Production build 0.71.5 2024