I'm running workbench_email on Acquia using PHP 5.6 and when sending emails on state change my logs are flooded with PHP notices, as follows:
Notice: Undefined index: illustrate in workbench_email_form() (line 157 of docroot/sites/all/modules/contrib/workbench_email/workbench_email.admin.inc).
Notice: Undefined index: copy_edit in workbench_email_form() (line 157 of docroot/sites/all/modules/contrib/workbench_email/workbench_email.admin.inc).
Emails are also not being sent, but that may be another unrelated issue. Edit: emails are sending now. Hitting "save" on the admin form seemed to fix them (?) even though no changes were made.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | php_notices_on_php_5_6-2826187-10.patch | 1.77 KB | frosev |
| #9 | php_notices_on_php_5_6-2826187-9.patch | 1.24 KB | tobiasb |
| #4 | Screen Shot 2016-11-09 at 12.48.11 PM.png | 41.8 KB | jenlampton |
| #4 | Screen Shot 2016-11-09 at 12.44.12 PM.png | 92.34 KB | jenlampton |
Comments
Comment #2
frosev commentedThanks @jenlampton. The code in question fetches the state labels using the function
workbench_moderation_state_labels. It's iterating over each of the states' transitions. I'll try to reproduce the issue. Could you provide me with a screenshot of your configuration for workbench_email and workbench_moderation states and transitions?Comment #3
frosev commentedComment #4
jenlamptonThanks :)
Here's workbench email


Here's moderation:
Comment #5
jenlamptonComment #6
frosev commentedThank you. That's odd, the two transitions "illustrate" and "copy_edit" don't seem to be presented in the moderation screen. I've got a hunch that the workbench_emails table may still have the email settings for those two transitions/states in it's own table.
If you have access to the database could you do a quick query of that table and provide a screenshot?
If my above hunch is correct, we'll need to figure out why those records weren't purged.
Comment #7
frosev commentedHi @jenlampton,
Do you have a status update on this issue? Or were you able to resolve this issue?
Comment #8
tobiasbWhen a user deletes some workbench-mod states, then workbench-email should delete all sets where from/to_name is not anymore a state. Perhaps it is a good idea to add a update hook to do this also.
Comment #9
tobiasbRemove also sets with invalid roles.
Comment #10
frosev commentedThanks tobiasb,
I've reworked the function
workbench_email_deleteand made use ofhook_workbench_moderation_state_deleteandhook_workbench_moderation_transition_deleteto delete the necessary email templates.Comment #11
larowlan