Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | no-empty-workbench_moderation_state_new_3062336_2.patch | 1.2 KB | jstoller |
|
Comments
Comment #2
jstollerThis 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.