Workbench moderation is currently causing subscriptions_content_node_insert() to run with "$inserted" as TRUE when updating a node causing subscription notices to be sent out when subscription settings are set to not send out subscription notices during updates.
Ideally this issue would be fixed in workbench_moderate, however, after investigating I didn't notice a good clean way to do so since the final call to "subscriptions_content_node_update" is being kicked off by workbench_moderation's 'workbench_moderation_store' which calls node_save. At some point in the scheme of things is also calling a node_load which in turn sets the drupal_static variable "subscriptions_content_unpublished_nids" with the current node's nid.
** Note workbench_moderate relies on this final node_save call to save the current published revision as the rid being used in the node table.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2027767-3-subscription-add_workbench_moderation_support.patch | 1.98 KB | pattersonc |
Comments
Comment #1
grndlvl commentedComment #2
salvisThank you for your analysis and patch, grndlvl.
Any workbench_moderation.module users out here? Please review!
Comment #3
grndlvl commentedOK, the above patch didn't actually work in all cases.
After spending more time on this I came up with another solution. I am not positive it is the best
solution, but I cannot spend anymore time on this at the moment. I was on the wrong path
and this seemed to work so I am moving on at the moment.
Comment #4
salvisThank you for the updated patch and stating your situation.
Let's see what the testbot says, and hopefully some workbench_moderation.module users will pick up the ball.
Comment #5
shaneonabike commented@salvis: nice work
I tested this out and it works great! I also like the fact that when it's set to Published it then adds it appropriately to any queues which was a concern I had. So far testing this out the patch seems good.
Maybe a few others can verify that it's good though...
Comment #6
salvisThis looks straight-forward enough. I only have two minor things:
Missing trailing dot.
Please rewrite this using DBTNG db_select(). (Also, missing space.)
I know that db_query() usually works just fine and the docs say it's fine, but we should try to avoid it where we can. The reason is that it gives headaches to people trying to run Drupal on weird database systems like Oracle, which feature odd reserved names and other quirks. "state" might well be a reserved word for Oracle...
With DBTNG queries the Oracle driver can navigate all these quirks, but it's a pain with db_query().
After that, this is RTBC.
Comment #7
pattersonc commentedFixing minor issues mentioned by @salvis.
Comment #9
salvisStreamlined a little and committed to the -dev version.
Thanks to grndlvl, ShaneOnABike, and pattersonc!