If a node is moderated, but workbench_moderation_states_next() doesn't return any accessible transition states, then workbench_moderation_form_node_form_alter() erroneously sets $form['options']['workbench_moderation_state_new'] to an empty string. Modules that integrate with Workbench Moderation expect this value to be an array, if it exists at all. In my case, Workbench Email was crashing whenever a non-admin tried to create a new node.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jstoller created an issue. See original summary.

jstoller’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.2 KB

This patch updates workbench_moderation_form_node_form_alter(), so it only sets $form['options']['workbench_moderation_state_new'] if $form['revision_information']['workbench_moderation_state_new'] is set.