Module is not working and doesn't give permissions.

Created on 22 August 2024, about 1 year ago


Hello and thank you for the module but the problem is that it's not working I don't know if their is requirment that I'm not aware of but from what I read I need to remove permissions from the code module but it's still not working.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Ibrahim Tameme

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

Merge Requests

Comments & Activities

  • Issue created by @Ibrahim Tameme
  • πŸ‡¨πŸ‡­Switzerland castellad@gmail.com

    Hi Ibrahim,
    You need to disable the permission under the module "content moderation".
    If you have more information, i would be happy to help you.
    Best regards

  • πŸ‡―πŸ‡΄Jordan Ibrahim Tameme

    Hi thank you for the quick response, I did do that unless I'm missing something below is a screenshot of the content moderation page were I unchecked all the permissions and other page is for content moderation permissions and I added some permissions to check but it's not working still please tell me if i'm missing something.

  • πŸ‡§πŸ‡ͺBelgium Cyberwolf

    What seems missing from the instructions is that you must also change the form field widget that is used for the 'Moderation state' field. By default the 'Moderation state' widget is used for this one, but you need to change this to 'Moderation state permissions', for each content type (path admin/structure/types/manage/[content-type]/form-display).

  • πŸ‡ΊπŸ‡ΈUnited States recrit

    @cyberwolf I agree. That is what the service's "decorates" property was meant to do. The "decorates" let's you extend the parent service - content_moderation.state_transition_validation in this case - without overriding the entire service.
    I am working on a PR to do this.
    We will be stuck with keeping the "Moderation state permissions" field widget to support existing sites using it. We could mark as deprecated since it is no longer needed. Alternatively, we could create an update to set them all back to Drupal core's field widget.

  • πŸ‡ΊπŸ‡ΈUnited States recrit
  • πŸ‡ΊπŸ‡ΈUnited States recrit

    MR4 created with the following changes:

    • Updated the service content_moderation_permissions.state_transition_validation to decorate core's service content_moderation.state_transition_validation so that the duplicated code from the content_moderation module is not needed.
    • Removed the Field widget "moderation_state_permissions_default". An update is provided to set the widget configuration back to the "moderation_state_default".
    • Removed the field constraint / Validation plugin: "ModerationStatePermissions"
  • Status changed to Needs review 4 months ago
  • πŸ‡§πŸ‡ͺBelgium Cyberwolf

    @recrit overal the MR is looking good. I just added 2 minor suggestions to it.

    Unfortunately it still seems to be necessary to extend the existing class due to other code that expects an instance of that particular class instead of any implementation of the interface, e.g. some contrib modules like scheduled_publish. It might be worth opening separate issues in those projects in order to eventually clean the last bits up, but IMHO this certainly shouldn't be blocking the MR.

  • πŸ‡ΊπŸ‡ΈUnited States recrit

    @cyberwolf thanks for the review. I'll make the updates when I get a few minutes.
    For extending the core class - Yes, it was needed. Other modules such as https://www.drupal.org/project/gcontent_moderation β†’ do the same by extending core's class.
    For reference, I have gcontent_moderation installed along with content_moderation_permissions and they are working well together.

  • πŸ‡ΊπŸ‡ΈUnited States recrit

    @cyberwolf MR updated

Production build 0.71.5 2024