I would like to use this module to moderate revisions on my Drupal 5.7 site. I am using the 'modr8' to moderate my new posts and that is working great. However, I have enabled revision moderation and updated a Page 'content type' to use the following 3 permissions, 'Create new revision', 'In moderation queue' (modr8), 'New revisions in moderation' as the default. I have a basic role 'contributor' which does *not* have 'administer nodes' privileges.

Unfortunately, when my 'contributor' role edits a page, the page is immediately updated and does not do into revision moderation.

Can anyone help? Is there a patch for 5.7 to make the revision moderation module work?

As a side note, I have tried this with both the 'Exempt administrator...' setting on and off - I think I remember reading some post above about that setting. Neither way helped moderate my 'contributor' role revisions.

FYI - I accidentally posted this same issue against Drupal 5.7 and later realized that I had not posted it here as an issue against the revision moderation module. That issue is http://drupal.org/node/114822.

Also, I have just upgraded to the 1.x-dev release from the 1.0 release but this made no difference. Is there still a patch needed for Drupal 5.7 to get this module working?

Comments

FredJones’s picture

I am seeing the same behavior using Drupal 5.7 and latest versions of Revision Moderation and Modr8 modules.

just_an_old_punk’s picture

I have found a somewhat usable workaround/solution to this...

The revision moderation module supplies an add-in to the workflow-ng module that provides 3 additional actions. One of these is "enable revision moderation". So, by writing a workflow-ng rule to detect when new content comes out of moderation, you can then 'enable revision moderation'. And the revision moderation module takes care of future edits. I still haven't completed my rule for this detection yet, turning revision moderation on after new content is created is too early. In that any Edits made by the Author or administrator before moderation approval occurs will be handled by revision moderation not the modr8 moderation... I probably need to write a custom PHP/SQL function that checks the nodes moderation ($node->moderation) value. Supplying these sorts of functions from the modr8 module would be nice, I may look at tacking on some custom workflow-ng actions to the modr8 module as the revision moderation module does.

Pushkar Gaikwad’s picture

yep not working in 5.7

Subscribe :)

just_an_old_punk’s picture

You'll need to customize these but here is an export a workflow-ng rule that helps integrated modr8 and revision_moderation modules. I do not claim (or believe) that this is a complete solution. Here is what it does, how it works and what it doesn't do:

What it does:

  1. New content with the "In moderation queue" flag is placed in the modr8 queue, as normal.
  2. When new content is posted the "New revisions in moderation" flag is turned on.
  3. Now, any future edit of the content with the "Create new revision" flag will be put into revision_moderation queue.

Assumptions

  • Assumes that your content type has "Create new revision" and "In moderation queue" flags enabled.
  • Assumes that your content type has "New revisions in moderation" disabled.

How it works:
The "New revisions in moderation" flag is turned on by calling a new workflow-ng function/action, provided by the revision_moderation module (I don't know what version this became available but the most recent for Drupal 5.x/5.7 has it).

What it doesn't do:
You may already see the current shortcoming, when a post is placed in the modr8 queue the "New revisions in moderation" flag has already been enabled on the first version. If your moderator or author goes and edits the post before it is "approved" by the modr8 module AND the user doing the editing does not turn off the "Create new revision" flag (in my case most do not have permissions to do this), then you will have 2 pending posts. The first revision in the modr8 queue and the second revision in the revision_moderation queue.

The workaround is to turn off the "Create new revision" flag. Unfortunately I'd have to give the users the "administer nodes" permission for them to be able to access the flag and that is not going to be possible for all users, maybe just a select group.

For now I am willing to live with this because I am running a very small site and the handful of times this situation may occur is perfectly acceptable to me (I'm the one who has to deal with the 2 versions anyway - I just approve the first then publish the 2nd or if I'm the one performing the edit, I turn off the "Create new revision" flag.)

Rules configurations for workflow-ng:

  1. The first rule enables the "New revisions in moderation" flag. It includes an email notification to the "moderators" role that new content is in the queue and log message to the system log.
  2. The second rule includes an email notification to the "moderators" role that a new revision has entered the queue. WARNING: this one has a bug that it includes the original author's name in the email rather than the name of the user who created the new revision! I just saw that yesterday and haven't fixed it yet.

Add enable revision moderation to new content

array (
  'cfg_7' => 
  array (
    '#weight' => '0',
    '#label' => 'Add enable revision moderation to new content',
    '#event' => 'node_insert',
    '#type' => 'configuration',
    '#id' => 1,
    '#active' => 1,
    '#module' => 'workflow-ng',
    '#altered' => false,
    0 => 
    array (
      '#id' => 2,
      '#name' => 'workflow_ng_action_watchdog',
      '#type' => 'action',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'Node [node:title] has been created, revision moderation enabled',
        'message_args' => 
        array (
          0 => 'node',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
    ),
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'revision_moderation_workflow_ng_enable',
      '#id' => 3,
      '#argument map' => 
      array (
        'node' => 'node',
      ),
    ),
    2 => 
    array (
      '#id' => 4,
      '#label' => 'Notify moderators of new content',
      '#type' => 'action',
      '#name' => 'workflow_ng_action_mail_to_users_of_role',
      '#settings' => 
      array (
        'from' => 'webmaster@devnull.com',
        'from_args' => 
        array (
        ),
        'subject' => 'New content [node:title] has been created',
        'subject_args' => 
        array (
          0 => 'node',
        ),
        'message' => 'User [author:user] has created new content [node:site-url]/[node:path]

You are receiving this email because you are a moderator at [node:site-name] website. If you have received this email in error, please contact [node:site-url]/contact/the_site_administrator and request that your account be taken off the list.',
        'message_args' => 
        array (
          0 => 'node',
          1 => 'author',
        ),
        'recipients' => 
        array (
          7 => 7,
        ),
      ),
    ),
    '#name' => 'cfg_7',
  ),
)

Notify moderators of new revision to an article

array (
  'cfg_8' => 
  array (
    '#weight' => '0',
    '#altered' => false,
    '#active' => 1,
    '#module' => 'workflow-ng',
    '#id' => 1,
    '#event' => 'node_update',
    '#type' => 'configuration',
    '#label' => 'Notify moderators of new revision to an article',
    0 => 
    array (
      '#id' => 2,
      '#label' => 'Revision moderation is on',
      '#type' => 'condition',
      '#name' => 'workflow_ng_condition_token_compare',
      '#settings' => 
      array (
        'text1' => '[node:revision_moderation]',
        'text1_args' => 
        array (
          0 => 'node',
        ),
        'text2' => 'on',
        'text2_args' => 
        array (
        ),
        'regex' => 0,
      ),
    ),
    1 => 
    array (
      '#label' => 'Is a new revision',
      '#name' => 'workflow_ng_condition_token_compare',
      '#type' => 'condition',
      '#id' => 3,
      '#settings' => 
      array (
        'text1' => '[node:revision]',
        'text1_args' => 
        array (
          0 => 'node',
        ),
        'text2' => 'on',
        'text2_args' => 
        array (
        ),
        'regex' => 0,
      ),
    ),
    2 => 
    array (
      '#name' => 'workflow_ng_action_mail_to_users_of_role',
      '#id' => 4,
      '#type' => 'action',
      '#label' => 'Notify moderators of new revision to an article',
      '#settings' => 
      array (
        'from' => 'webmaster@devnull.com',
        'from_args' => 
        array (
        ),
        'subject' => 'New revision of [node:title] has been created',
        'subject_args' => 
        array (
          0 => 'node',
        ),
        'message' => 'User [author:user] has created a new revision of [node:site-url]/[node:path].

You are receiving this email because you are a moderator at [node:site-name] website. If you have received this email in error, please contact [node:site-url]/contact/the_site_administrator and request that your account be taken off the list.',
        'message_args' => 
        array (
          0 => 'node',
          1 => 'author',
        ),
        'recipients' => 
        array (
          7 => 7,
        ),
      ),
    ),
    3 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'A new revision of node [node:nid] has been made',
        'message_args' => 
        array (
          0 => 'node',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#id' => 5,
    ),
    '#name' => 'cfg_8',
  ),
)

Hope it is useful to someone!

add1sun’s picture

Status: Active » Postponed (maintainer needs more info)

Revisions are moderated for me in D5.10 now. Is this still a problem for others?

add1sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

No response in a month. Closing as fixed now.

sourabh.iitm’s picture

I also faced the same problem in drupal 5.12. But i got it fixed.

The problem for me was content access module
Initially i gave editing permission using content access module for revision moderation and it was not working at all but now i am using drupal's default access control for a specific content type for a specific role and it is working for me. I am still using content access module but i have given permission for editing a specific content type using drupals default access control for specific roles.

content access module : http://drupal.org/project/content_access

Tell me if it is helping anyone else!!

Status: Fixed » Closed (fixed)

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