Support Modr8 Module

gregarios - August 28, 2009 - 23:58
Project:Subscriptions
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Working with the late Aug 27th version of 6.x-1.x-dev, I performed the following tests:

  • Set maximum emails per cron run to 10
  • Set a taxonomy story term of 'newsletter' which are subscribed to by 1400 users in digest mode
  • Created 2 newsletter stories, but did not set them to publish. I sent them to moderation (Modr8 Module - http://drupal.org/project/modr8)
  • Examined subscriptions_queue table: 2800 entries
  • Ran cron again and examined subscriptions_queue table: Empty
  • No emails received.
  • Approved the 2 stories from moderation, publishing them
  • Examined subscriptions_queue table: Empty

There seems to be an incompatibility here between Subscriptions and the Modr8 Module. When Modr8 sets the nodes to 'published' via its node approval UI, then Subscriptions Module doesn't recognize it. Subscriptions does recognize an unmoderated, normal change in a story from 'unpublished' to 'published,' however.

#1

salvis - August 29, 2009 - 12:36
Title:Modr8 Module Incompatibility» Support Modr8 Module
Category:bug report» feature request

Yes, modr8 goes directly to the database, bypassing the Drupal mechanisms for updating a node, which would trigger Subscriptions:

<?php
       
if (user_access('administer nodes')) {
         
$publish = ', status = 1';
        }
       
db_query('UPDATE {node} SET moderate = 0 '. $publish .' WHERE nid = %d', $nid);
?>

Now, let's assume for a moment, that we can fix that. But what's the workflow with modr8? Apparently you're setting the modr8 flag and clearing the published flag, which means only users with 'administer nodes' can actually make your nodes show up.

However, if I understand this correctly, modr8 should also work without 'administer nodes', i.e. with published nodes, no? This means, if Subscriptions were to support modr8, it ought not to send notifications for nodes in moderation (except possibly for users with the modr8 permission) until they are approved.

IOW, the moderate flag would have to be treated like the 'unpublished' flag. Isn't that so?

#2

gregarios - August 29, 2009 - 15:22

Now, let's assume for a moment, that we can fix that. But what's the workflow with modr8? Apparently you're setting the modr8 flag and clearing the published flag, which means only users with 'administer nodes' can actually make your nodes show up.

Clearing the 'published' flag is optional, and can be set as default or not on a per-content-type basis. The workflow with Modr8 is such: When you are in node creation, there is an extra option in the 'Publishing Options' that lets you put the node 'In moderation queue' so it will appear in a list of nodes with a little 'approve/deny/note' UI. The Modr8 module notifies the site moderator of the newly created node as well, via email.

So, the node creator can set the 'published' state or not, and the 'in moderation' state as well, from node creation (if they have permission). Defaults are set in Modr8, and the standard Drupal permissions let you hide the whole process from untrusted node creators — like bloggers and such — giving the moderator full control over what kind of nodes are "publish first then moderate, or "moderate then publish" kind of nodes.

IOW, the moderate flag would have to be treated like the 'unpublished' flag. Isn't that so?

I would think that would be so. Using Modr8, you can set a node as 'published' while still giving it the 'moderate' flag, which basically just puts it in the moderate queue for easy access to be able to deny or approve it while it is visible on the site.

I would think that if it is published, and is put in the moderate queue, then a person can expect it not to go out as a subscription so they can deny it in the queue still, removing it from the site and the subscriptions (before it gets to the users' inbox). I would assume that if someone published a node, but still put it in the Modr8 queue, they are expecting to be able to revoke the published (and subscribed) state at some point soon.

So, your thinking on treating the 'moderate' flag as an 'unpublished' flag is a good way to do it in my opinion. If Modr8 users wish the Subscriptions to go out when a node is published and the node is still in the Modr8 queue, then I would think the Moder8 module would need to be updated for that functionality.

I opened an issue with the Modr8 maintainers: http://drupal.org/node/563138

#3

salvis - August 30, 2009 - 22:21

Thank you for your explanations. Since modr8 provides its own notification mechanism, Subscriptions should probably not send out any notifications at all if the moderate flag is set.

If Modr8 users wish the Subscriptions to go out when a node is published and the node is still in the Modr8 queue, then I would think the Moder8 module would need to be updated for that functionality.

I can't think of any use case for that.

#4

gregarios - August 30, 2009 - 22:54

The Modr8 notifications only go out to the moderator when a node is created. Then, the creators of the nodes get notifications telling them if their post was approved, denied, or a note about the post from the moderator. No regular users are involved.

 
 

Drupal is a registered trademark of Dries Buytaert.