- πΊπΈUnited States rraney
I don't have Workbench Moderation installed, but I do have Workbench and Workbench Access. Our scheduling does not work and this issue is the closest I've been able to find to our own issue. Are Workbench and Workbench Access related to Workbench Moderation in any way? Is it the same family of modules?
- πΊπΈUnited States khaldoon_masud
I solved this issue by installing the module https://www.drupal.org/project/advanced_scheduler β , and implementing a custom hook:
/** * Implements hook_action_info_alter(). */ function module_name_action_info_alter(&$definitions) { // Scheduler module does not work with the workbench moderation module, because scheduler calls the publish_action and unpublish_action plugins // which are overwritten by workbench_moderation module (lookat workbench_moderation_action_info_alter) // Prevent/revert the overwrite with the below code, since advanced_scheduler module is capable of publish/unpublish moderated content. if (isset($definitions['node_publish_action']['class']) && $definitions['node_publish_action']['class'] == ModerationOptOutPublishNode::class) { $definitions['node_publish_action']['class'] = PublishAction::class; } if (isset($definitions['node_unpublish_action']['class']) && $definitions['node_unpublish_action']['class'] == ModerationOptOutUnpublishNode::class) { $definitions['node_unpublish_action']['class'] = UnpublishAction::class; } if (isset($definitions['entity:publish_action:node']['class']) && $definitions['entity:publish_action:node']['class'] == ModerationOptOutPublishNode::class) { $definitions['entity:publish_action:node']['class'] = PublishAction::class; } if (isset($definitions['entity:unpublish_action:node']['class']) && $definitions['entity:unpublish_action:node']['class'] == ModerationOptOutUnpublishNode::class) { $definitions['entity:publish_action:node']['class'] = UnpublishAction::class; } }
You may need to modify module weight, so above hook runs after workbench_moderation_action_info_alter